Skip to content

Commit

Permalink
ci(test-db): don't destroy test db after test is done for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Sep 3, 2024
1 parent 882d9d9 commit eb10a1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/aiproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,6 @@
)

ENABLE_PREDICTION_API = env("ENABLE_PREDICTION_API", default=False)


TEST_RUNNER = 'tests.test_runners.NoDestroyTestRunner'
7 changes: 7 additions & 0 deletions backend/tests/test_runners.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.test.runner import DiscoverRunner
from django.db import connections

class NoDestroyTestRunner(DiscoverRunner):
def teardown_databases(self, old_config, **kwargs):
## TODO : Do proper teardown
pass

0 comments on commit eb10a1b

Please sign in to comment.