mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Improve DB clean up after test runs
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user