We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6528bc9 commit abfc7f2Copy full SHA for abfc7f2
tests/test_fixtures.py
@@ -606,15 +606,15 @@ class Test_django_db_blocker:
606
def test_block_manually(self, django_db_blocker):
607
try:
608
django_db_blocker.block()
609
- with pytest.raises(RuntimeError):
+ with pytest.raises(RuntimeError, match="^Database access not allowed,"):
610
Item.objects.exists()
611
finally:
612
django_db_blocker.restore()
613
614
@pytest.mark.django_db
615
def test_block_with_block(self, django_db_blocker):
616
with django_db_blocker.block():
617
618
619
620
def test_unblock_manually(self, django_db_blocker):
0 commit comments