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
I'm working on a app with default data migrations (some models are populated with the RunPython migration method, ie. default users, related models for select...).
I'm working on a test with data sets declares in a list of dicts, using a fixture with the request.param magic.
My fixture data looks like:
FIXTURE_DATA= [{"name": "Foo"}, {"name": "Bar"}...]
@pytest.fixture(scope="session", params=FIXTURE_DATA)defdata(request)
returnrequest.param@pytest.mark.django_dbdeftest_01_data(data):
# Make the stuff...pass
Then I try to run the test, with a single fixture yielding my test data, the whole content of the database is freed between each fixture run:
First data dict instance: OK
Second data dict instance: The database structure is in place, but RunPython migrated data are flushed... my test cannot continue.
I'm using a "droppable" sqlite file in /dev/shm, I'ld like to explore the content of the database after the tests - is it possible ?
Thanks !
The text was updated successfully, but these errors were encountered:
Hi,
I'm working on a app with default data migrations (some models are populated with the
RunPython
migration method, ie. default users, related models for select...).I'm working on a test with data sets declares in a list of dicts, using a fixture with the
request.param
magic.My fixture data looks like:
Then I try to run the test, with a single fixture yielding my test data, the whole content of the database is freed between each fixture run:
RunPython
migrated data are flushed... my test cannot continue.I'm using a "droppable" sqlite file in /dev/shm, I'ld like to explore the content of the database after the tests - is it possible ?
Thanks !
The text was updated successfully, but these errors were encountered: