From c5a664dc81fae524cd5be5e1f2616fb5afa149a6 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Thu, 18 Jul 2024 12:11:29 -0400 Subject: [PATCH] Allow running tests without PG on unmigrated db #11204 --- tests/base_test.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/base_test.py b/tests/base_test.py index e14aa2efbf6..4ac5be1f76d 100644 --- a/tests/base_test.py +++ b/tests/base_test.py @@ -73,10 +73,12 @@ def __init__(self, *args, **kwargs) -> None: def setup_databases(self, **kwargs): ret = super().setup_databases(**kwargs) - app_settings() # adds languages to system - prepare_terms_index(create=True) - prepare_concepts_index(create=True) - prepare_search_index(create=True) + # Some tests don't use the database. + if kwargs.get("aliases", None): + app_settings() # adds languages to system + prepare_terms_index(create=True) + prepare_concepts_index(create=True) + prepare_search_index(create=True) return ret