1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Made select_for_update() don't raise TransactionManagementError on databases that don't support transactions.

This commit is contained in:
Mariusz Felisiak
2022-04-14 07:53:15 +02:00
committed by GitHub
parent db83ac48d4
commit a0bd006306
3 changed files with 12 additions and 15 deletions

View File

@@ -491,7 +491,7 @@ class SelectForUpdateTests(TransactionTestCase):
str(Person.objects.filter(name="foo").select_for_update().query),
)
@skipUnlessDBFeature("has_select_for_update")
@skipUnlessDBFeature("has_select_for_update", "supports_transactions")
def test_for_update_requires_transaction(self):
"""
A TransactionManagementError is raised
@@ -501,7 +501,7 @@ class SelectForUpdateTests(TransactionTestCase):
with self.assertRaisesMessage(transaction.TransactionManagementError, msg):
list(Person.objects.select_for_update())
@skipUnlessDBFeature("has_select_for_update")
@skipUnlessDBFeature("has_select_for_update", "supports_transactions")
def test_for_update_requires_transaction_only_in_execution(self):
"""
No TransactionManagementError is raised