We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c257569 + d07a967 commit 49829b5Copy full SHA for 49829b5
1 file changed
tests/test_fixtures.py
@@ -725,15 +725,15 @@ class Test_django_db_blocker:
725
def test_block_manually(self, django_db_blocker: DjangoDbBlocker) -> None:
726
try:
727
django_db_blocker.block()
728
- with pytest.raises(RuntimeError):
+ with pytest.raises(RuntimeError, match="^Database access not allowed,"):
729
Item.objects.exists()
730
finally:
731
django_db_blocker.restore()
732
733
@pytest.mark.django_db
734
def test_block_with_block(self, django_db_blocker: DjangoDbBlocker) -> None:
735
with django_db_blocker.block():
736
737
738
739
def test_unblock_manually(self, django_db_blocker: DjangoDbBlocker) -> None:
0 commit comments