Skip to content

Commit

Permalink
Added missing decorators to tests that depended on the DB but weren't…
Browse files Browse the repository at this point in the history
… marked as such
  • Loading branch information
SalmonMode committed Jan 17, 2020
1 parent 6528bc9 commit debecc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,15 @@ def test_block_with_block(self, django_db_blocker):
with pytest.raises(RuntimeError):
Item.objects.exists()

@pytest.mark.django_db
def test_unblock_manually(self, django_db_blocker):
try:
django_db_blocker.unblock()
Item.objects.exists()
finally:
django_db_blocker.restore()

@pytest.mark.django_db
def test_unblock_with_block(self, django_db_blocker):
with django_db_blocker.unblock():
Item.objects.exists()
Expand Down

0 comments on commit debecc8

Please sign in to comment.