File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,16 @@ def test_migrations_are_complete():
1414 assert migrations_are_complete ()
1515
1616
17- class TestAdvisoryLock :
18- THREAD_WAIT_TIME = 0.1
19-
17+ class SkipIfSqlite :
2018 @pytest .fixture (autouse = True )
2119 def skip_if_sqlite (self ):
2220 if connection .vendor == 'sqlite' :
2321 pytest .skip ('Advisory lock is not written for sqlite' )
2422
23+
24+ class TestAdvisoryLock (SkipIfSqlite ):
25+ THREAD_WAIT_TIME = 0.1
26+
2527 @pytest .mark .django_db
2628 def test_get_unclaimed_lock (self ):
2729 with advisory_lock ('test_get_unclaimed_lock' ):
@@ -62,7 +64,7 @@ def test_invalid_tuple_name(self):
6264# Special transaction=True parameter is used, because we do not want in normal test transactions
6365# because dropping the connection would break the transaction context, erroring at end of test
6466@pytest .mark .django_db (transaction = True )
65- class TestAdvisoryLockPostgresErrors :
67+ class TestAdvisoryLockPostgresErrors ( SkipIfSqlite ) :
6668 """Tests related to connection management and the advisory_lock"""
6769
6870 def kick_connection (self ):
You can’t perform that action at this time.
0 commit comments