Skip to content

Commit 9854e91

Browse files
committed
Not a fan of the 'db' but depricating it is a much bigger undertaking
1 parent 687abcb commit 9854e91

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pytest_django/fixtures.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def async_client() -> django.test.AsyncClient:
458458

459459

460460
@pytest.fixture
461-
def django_user_model() -> type[django.contrib.auth.models.User]:
461+
def django_user_model(db: None) -> type[django.contrib.auth.models.User]:
462462
"""The class of Django's user model."""
463463
from django.contrib.auth import get_user_model
464464

@@ -474,6 +474,7 @@ def django_username_field(django_user_model: type[django.contrib.auth.models.Use
474474

475475
@pytest.fixture
476476
def admin_user(
477+
db: None,
477478
django_user_model: type[django.contrib.auth.models.User],
478479
django_username_field: str,
479480
) -> django.contrib.auth.models.User:
@@ -504,6 +505,7 @@ def admin_user(
504505

505506
@pytest.fixture
506507
def admin_client(
508+
db: None,
507509
admin_user: django.contrib.auth.models.User,
508510
) -> django.test.Client:
509511
"""A Django test client logged in as an admin user."""

0 commit comments

Comments
 (0)