mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed DatabaseFeatures.uses_savepoints/can_release_savepoints and related tests with MyISAM storage engine.
This commit is contained in:
@@ -291,7 +291,7 @@ class SelectForUpdateTests(TransactionTestCase):
|
||||
qs = Person.objects.select_for_update(of=("self", "born"))
|
||||
self.assertIs(qs.exists(), True)
|
||||
|
||||
@skipUnlessDBFeature("has_select_for_update_nowait")
|
||||
@skipUnlessDBFeature("has_select_for_update_nowait", "supports_transactions")
|
||||
def test_nowait_raises_error_on_block(self):
|
||||
"""
|
||||
If nowait is specified, we expect an error to be raised rather
|
||||
@@ -312,7 +312,7 @@ class SelectForUpdateTests(TransactionTestCase):
|
||||
self.end_blocking_transaction()
|
||||
self.assertIsInstance(status[-1], DatabaseError)
|
||||
|
||||
@skipUnlessDBFeature("has_select_for_update_skip_locked")
|
||||
@skipUnlessDBFeature("has_select_for_update_skip_locked", "supports_transactions")
|
||||
def test_skip_locked_skips_locked_rows(self):
|
||||
"""
|
||||
If skip_locked is specified, the locked row is skipped resulting in
|
||||
@@ -599,7 +599,7 @@ class SelectForUpdateTests(TransactionTestCase):
|
||||
p = Person.objects.get(pk=self.person.pk)
|
||||
self.assertEqual("Fred", p.name)
|
||||
|
||||
@skipUnlessDBFeature("has_select_for_update")
|
||||
@skipUnlessDBFeature("has_select_for_update", "supports_transactions")
|
||||
def test_raw_lock_not_available(self):
|
||||
"""
|
||||
Running a raw query which can't obtain a FOR UPDATE lock raises
|
||||
|
||||
Reference in New Issue
Block a user