Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
def pytest_collection_modifyitems(items):
"""Add django_db marker with databases to tests that need database access."""
for item in items:
if item.get_closest_marker("django_db") is not None:
# Test has its own explicit marker
continue
fixturenames = getattr(item, "fixturenames", ())
# Tests using client fixtures or dashboard_db need both databases
if any(f in fixturenames for f in ("admin_client", "client", "dashboard_db")):
Expand Down
Loading