You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my project, I have an integration test which uses its own prefilled database. This means that in conftest.py, I overwrote this fixture as:
@pytest.fixturedefdjango_db_setup():
pass
in order to prevent the database being created. This works fine until I introduced an end-to-end test using the fixture live_server. If this fixture is used, my database is dropped after all tests have finished. It of course is not very pleasant that a database is dropped by a 3rd party library which has been set up by someone else.
I haven't found any possibility to prevent dropping the database, since there is no fixture such as django_db_teardown which could be overridden.
I'm using Django-4.0.10, pytest-7.2.2, pytest-django-4.5.2.
The text was updated successfully, but these errors were encountered:
In my project, I have an integration test which uses its own prefilled database. This means that in
conftest.py
, I overwrote this fixture as:in order to prevent the database being created. This works fine until I introduced an end-to-end test using the fixture
live_server
. If this fixture is used, my database is dropped after all tests have finished. It of course is not very pleasant that a database is dropped by a 3rd party library which has been set up by someone else.I haven't found any possibility to prevent dropping the database, since there is no fixture such as
django_db_teardown
which could be overridden.I'm using Django-4.0.10, pytest-7.2.2, pytest-django-4.5.2.
The text was updated successfully, but these errors were encountered: