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:
725
725
def test_block_manually (self , django_db_blocker : DjangoDbBlocker ) -> None :
726
726
try :
727
727
django_db_blocker .block ()
728
- with pytest .raises (RuntimeError ):
728
+ with pytest .raises (RuntimeError , match = "^Database access not allowed," ):
729
729
Item .objects .exists ()
730
730
finally :
731
731
django_db_blocker .restore ()
732
732
733
733
@pytest .mark .django_db
734
734
def test_block_with_block (self , django_db_blocker : DjangoDbBlocker ) -> None :
735
735
with django_db_blocker .block ():
736
- with pytest .raises (RuntimeError ):
736
+ with pytest .raises (RuntimeError , match = "^Database access not allowed," ):
737
737
Item .objects .exists ()
738
738
739
739
def test_unblock_manually (self , django_db_blocker : DjangoDbBlocker ) -> None :
You can’t perform that action at this time.
0 commit comments