We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abc12e0 commit 1441afcCopy full SHA for 1441afc
docs/faq.rst
@@ -103,6 +103,15 @@ compatible with this approach, you need to use the standard Django methods of
103
setting the ``DJANGO_SETTINGS_MODULE``/``DJANGO_CONFIGURATION`` environmental
104
variables or the ``--settings`` command line option.
105
106
+How can I give database access to all my tests without the `django_db` marker?
107
+------------------------------------------------------------------------------
108
+
109
+Create an autouse fixture and put it in `conftest.py` in your project root::
110
111
+ @pytest.fixture(autouse=True)
112
+ def enable_db_access_for_all_tests(db):
113
+ pass
114
115
How/where can I get help with pytest/pytest-django?
116
---------------------------------------------------
117
0 commit comments