Skip to content

Commit

Permalink
use LiveServerTestCase class
Browse files Browse the repository at this point in the history
  • Loading branch information
MazOneTwoOne committed Apr 17, 2024
1 parent 0821056 commit 0e5b15b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fala/apps/adviser/tests/test_search_view_function.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.test import SimpleTestCase, Client, override_settings
from django.test import SimpleTestCase, Client, LiveServerTestCase, override_settings
from django.urls import reverse


Expand All @@ -18,7 +18,7 @@ def test_invalid_postcode_generates_error(self):


@override_settings(FEATURE_FLAG_NO_MAP=True)
class NewSearchViewTemplate(SimpleTestCase):
class NewSearchViewTemplate(LiveServerTestCase):
client = Client()

def test_template_link_and_css(self):
Expand Down
3 changes: 3 additions & 0 deletions fala/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ def root(*x):

CHECK_LEGAL_AID_URL = "https://www.gov.uk/check-legal-aid"

# We need a default database in order to run a LiveServerTestCase test.
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}}

# .local.py overrides all the common settings.
try:
from .local import * # noqa: F401,F403
Expand Down

0 comments on commit 0e5b15b

Please sign in to comment.