@@ -201,7 +201,7 @@ def django_db_setup(
201201 )
202202
203203
204- @pytest .fixture ()
204+ @pytest .fixture
205205def _django_db_helper (
206206 request : pytest .FixtureRequest ,
207207 django_db_setup : None ,
@@ -365,7 +365,7 @@ def _set_suffix_to_test_databases(suffix: str) -> None:
365365# ############### User visible fixtures ################
366366
367367
368- @pytest .fixture ()
368+ @pytest .fixture
369369def db (_django_db_helper : None ) -> None :
370370 """Require a django test database.
371371
@@ -382,7 +382,7 @@ def db(_django_db_helper: None) -> None:
382382 # The `_django_db_helper` fixture checks if `db` is requested.
383383
384384
385- @pytest .fixture ()
385+ @pytest .fixture
386386def transactional_db (_django_db_helper : None ) -> None :
387387 """Require a django test database with transaction support.
388388
@@ -398,7 +398,7 @@ def transactional_db(_django_db_helper: None) -> None:
398398 # The `_django_db_helper` fixture checks if `transactional_db` is requested.
399399
400400
401- @pytest .fixture ()
401+ @pytest .fixture
402402def django_db_reset_sequences (
403403 _django_db_helper : None ,
404404 transactional_db : None ,
@@ -414,7 +414,7 @@ def django_db_reset_sequences(
414414 # is requested.
415415
416416
417- @pytest .fixture ()
417+ @pytest .fixture
418418def django_db_serialized_rollback (
419419 _django_db_helper : None ,
420420 db : None ,
@@ -435,7 +435,7 @@ def django_db_serialized_rollback(
435435 # is requested.
436436
437437
438- @pytest .fixture ()
438+ @pytest .fixture
439439def client () -> django .test .Client :
440440 """A Django test client instance."""
441441 skip_if_no_django ()
@@ -445,7 +445,7 @@ def client() -> django.test.Client:
445445 return Client ()
446446
447447
448- @pytest .fixture ()
448+ @pytest .fixture
449449def async_client () -> django .test .AsyncClient :
450450 """A Django test async client instance."""
451451 skip_if_no_django ()
@@ -455,22 +455,22 @@ def async_client() -> django.test.AsyncClient:
455455 return AsyncClient ()
456456
457457
458- @pytest .fixture ()
458+ @pytest .fixture
459459def django_user_model (db : None ):
460460 """The class of Django's user model."""
461461 from django .contrib .auth import get_user_model
462462
463463 return get_user_model ()
464464
465465
466- @pytest .fixture ()
466+ @pytest .fixture
467467def django_username_field (django_user_model ) -> str :
468468 """The fieldname for the username used with Django's user model."""
469469 field : str = django_user_model .USERNAME_FIELD
470470 return field
471471
472472
473- @pytest .fixture ()
473+ @pytest .fixture
474474def admin_user (
475475 db : None ,
476476 django_user_model ,
@@ -501,7 +501,7 @@ def admin_user(
501501 return user
502502
503503
504- @pytest .fixture ()
504+ @pytest .fixture
505505def admin_client (
506506 db : None ,
507507 admin_user ,
@@ -514,7 +514,7 @@ def admin_client(
514514 return client
515515
516516
517- @pytest .fixture ()
517+ @pytest .fixture
518518def rf () -> django .test .RequestFactory :
519519 """RequestFactory instance"""
520520 skip_if_no_django ()
@@ -524,7 +524,7 @@ def rf() -> django.test.RequestFactory:
524524 return RequestFactory ()
525525
526526
527- @pytest .fixture ()
527+ @pytest .fixture
528528def async_rf () -> django .test .AsyncRequestFactory :
529529 """AsyncRequestFactory instance"""
530530 skip_if_no_django ()
@@ -569,7 +569,7 @@ def finalize(self) -> None:
569569 del self ._to_restore [:]
570570
571571
572- @pytest .fixture ()
572+ @pytest .fixture
573573def settings ():
574574 """A Django settings object which restores changes after the testrun"""
575575 skip_if_no_django ()
@@ -702,13 +702,13 @@ def _assert_num_queries(
702702 pytest .fail (msg )
703703
704704
705- @pytest .fixture ()
705+ @pytest .fixture
706706def django_assert_num_queries (pytestconfig : pytest .Config ) -> DjangoAssertNumQueries :
707707 """Allows to check for an expected number of DB queries."""
708708 return partial (_assert_num_queries , pytestconfig )
709709
710710
711- @pytest .fixture ()
711+ @pytest .fixture
712712def django_assert_max_num_queries (pytestconfig : pytest .Config ) -> DjangoAssertNumQueries :
713713 """Allows to check for an expected maximum number of DB queries."""
714714 return partial (_assert_num_queries , pytestconfig , exact = False )
@@ -726,7 +726,7 @@ def __call__(
726726 pass # pragma: no cover
727727
728728
729- @pytest .fixture ()
729+ @pytest .fixture
730730def django_capture_on_commit_callbacks () -> DjangoCaptureOnCommitCallbacks :
731731 """Captures transaction.on_commit() callbacks for the given database connection."""
732732 from django .test import TestCase
0 commit comments