summaryrefslogtreecommitdiff
path: root/tests/select_for_update
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-04-14 07:53:15 +0200
committerGitHub <noreply@github.com>2022-04-14 07:53:15 +0200
commita0bd0063065de054c73d5984d7b4830e29e809e6 (patch)
treee6bb875b62ce3aced78237c66170adbc2d5b62d1 /tests/select_for_update
parentdb83ac48d4015ce3487405481426c3d2d38335df (diff)
Made select_for_update() don't raise TransactionManagementError on databases that don't support transactions.
Diffstat (limited to 'tests/select_for_update')
-rw-r--r--tests/select_for_update/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py
index 1612a66064..0251014541 100644
--- a/tests/select_for_update/tests.py
+++ b/tests/select_for_update/tests.py
@@ -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