Skip to content

Commit

Permalink
Allow running tests without PG on unmigrated db #11204
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jul 18, 2024
1 parent 3f4a3a8 commit c5a664d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c5a664d

Please sign in to comment.