I am defining a pytest fixture that to overrides the django_db_setup fixture.
The change I have sets up additional teardown for safety, as there are integration tests th
To inject custom behavior before the initial fixture is called you can create separate fixture with this behavior and use it before the initial fixture in parameter list of fixture that overrides previously defined:
@pytest.fixture(scope='session')
def inject_before():
print('inject_before')
@pytest.fixture(scope='session')
def django_db_setup(inject_before, django_db_setup):
print('inject_after')