Improve DB clean up after test runs

This commit is contained in:
Debanjum
2025-06-06 14:46:09 -07:00
parent 6ac1530816
commit 257c238a88
2 changed files with 8 additions and 0 deletions

View File

@@ -50,6 +50,13 @@ def enable_db_access_for_all_tests(db):
pass
@pytest.fixture(scope="session", autouse=True)
def django_db_setup(django_db_setup, django_db_blocker):
"""Ensure proper database setup and teardown for all tests."""
with django_db_blocker.unblock():
yield
@pytest.fixture(scope="session")
def search_config() -> SearchConfig:
state.embeddings_model = dict()