We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e6a296 commit 3ca9b46Copy full SHA for 3ca9b46
test_app/tests/lib/utils/test_db.py
@@ -14,18 +14,17 @@ def test_migrations_are_complete():
14
assert migrations_are_complete()
15
16
17
-@pytest.mark.django_db
18
-def test_get_unclaimed_lock():
19
- with advisory_lock('test_get_unclaimed_lock'):
20
- pass
21
-
22
23
class TestAdvisoryLock:
24
@pytest.fixture(autouse=True)
25
def skip_if_sqlite(self):
26
if connection.vendor == 'sqlite':
27
pytest.skip('Advisory lock is not written for sqlite')
28
+ @pytest.mark.django_db
+ def test_get_unclaimed_lock(self):
+ with advisory_lock('test_get_unclaimed_lock'):
+ pass
+
29
@staticmethod
30
def background_task(django_db_blocker):
31
# HACK: as a thread the pytest.mark.django_db will not work
0 commit comments