diff --git a/fala/apps/adviser/tests/test_search_view_function.py b/fala/apps/adviser/tests/test_search_view_function.py index e24db047..a1fff10f 100644 --- a/fala/apps/adviser/tests/test_search_view_function.py +++ b/fala/apps/adviser/tests/test_search_view_function.py @@ -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 @@ -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): diff --git a/fala/settings/base.py b/fala/settings/base.py index 3edad684..a7b885ba 100644 --- a/fala/settings/base.py +++ b/fala/settings/base.py @@ -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