1818
1919from .helpers import DjangoPytester
2020
21+ from pytest_django import DjangoDbBlocker
2122from pytest_django_test .app .models import Item
2223
2324
@@ -690,7 +691,7 @@ class Migration(migrations.Migration):
690691
691692class Test_django_db_blocker :
692693 @pytest .mark .django_db
693- def test_block_manually (self , django_db_blocker ) -> None :
694+ def test_block_manually (self , django_db_blocker : DjangoDbBlocker ) -> None :
694695 try :
695696 django_db_blocker .block ()
696697 with pytest .raises (RuntimeError ):
@@ -699,19 +700,19 @@ def test_block_manually(self, django_db_blocker) -> None:
699700 django_db_blocker .restore ()
700701
701702 @pytest .mark .django_db
702- def test_block_with_block (self , django_db_blocker ) -> None :
703+ def test_block_with_block (self , django_db_blocker : DjangoDbBlocker ) -> None :
703704 with django_db_blocker .block ():
704705 with pytest .raises (RuntimeError ):
705706 Item .objects .exists ()
706707
707- def test_unblock_manually (self , django_db_blocker ) -> None :
708+ def test_unblock_manually (self , django_db_blocker : DjangoDbBlocker ) -> None :
708709 try :
709710 django_db_blocker .unblock ()
710711 Item .objects .exists ()
711712 finally :
712713 django_db_blocker .restore ()
713714
714- def test_unblock_with_block (self , django_db_blocker ) -> None :
715+ def test_unblock_with_block (self , django_db_blocker : DjangoDbBlocker ) -> None :
715716 with django_db_blocker .unblock ():
716717 Item .objects .exists ()
717718
0 commit comments