A lot of issues reported would benefit from a more general approach to hooking into/overriding how pytest-django's internal fixtures with regard to managing the database. This issue is a place to collect related issues that should be solved when re-thinking/re-organizing the fixtures.
A lot of issues reported would benefit from a more general approach to hooking into/overriding how pytest-django's internal fixtures with regard to managing the database. This issue is a place to collect related issues that should be solved when re-thinking/re-organizing the fixtures.
The (now quite old) branch https://github.com/pytest-dev/pytest-django/tree/fixturefix is the place where I have been experimenting with ideas in this area.
Support hooking into database creation:
37 - alternative database setup schemes - use copy with sqlite /
CREATE DATABASE foo TEMPLATE template0;
98 - disable xdist suffix - customize test database name
84 - custom sequences - make it possible to run code after test database is created
Support having database fixtures in session, module, class scope:
105 - Do common db setup between tests once
243 - Support database access for "session" level fixtures