File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -725,15 +725,15 @@ class Test_django_db_blocker:
725725 def test_block_manually (self , django_db_blocker : DjangoDbBlocker ) -> None :
726726 try :
727727 django_db_blocker .block ()
728- with pytest .raises (RuntimeError ):
728+ with pytest .raises (RuntimeError , match = "^Database access not allowed," ):
729729 Item .objects .exists ()
730730 finally :
731731 django_db_blocker .restore ()
732732
733733 @pytest .mark .django_db
734734 def test_block_with_block (self , django_db_blocker : DjangoDbBlocker ) -> None :
735735 with django_db_blocker .block ():
736- with pytest .raises (RuntimeError ):
736+ with pytest .raises (RuntimeError , match = "^Database access not allowed," ):
737737 Item .objects .exists ()
738738
739739 def test_unblock_manually (self , django_db_blocker : DjangoDbBlocker ) -> None :
You can’t perform that action at this time.
0 commit comments