Skip to content

Commit 9972ec5

Browse files
authored
Improve error message
1 parent f18a858 commit 9972ec5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytest_django/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ def _blocking_wrapper(*args, **kwargs):
556556
__tracebackhide__ = True
557557
__tracebackhide__ # Silence pyflakes
558558
pytest.fail('Database access not allowed, '
559-
'use the "django_db" mark to enable it.')
559+
'use the "django_db" mark, or the '
560+
'"db" or "transactional_db" fixtures to enable it.')
560561

561562
def unblock(self):
562563
"""Enable access to the Django database."""

0 commit comments

Comments
 (0)