summaryrefslogtreecommitdiff
path: root/tests/select_for_update
diff options
context:
space:
mode:
authorShai Berger <shai@platonix.com>2014-08-01 01:36:06 +0300
committerShai Berger <shai@platonix.com>2014-08-05 03:12:08 +0300
commit746f2a4bed52254e1034c4462033226ff565146c (patch)
treeb85dfcc4be58245803c68c44a29d38a26bd29782 /tests/select_for_update
parent6d256ae248cfa1f111d03d29402a669a95cdff3c (diff)
Fixed #23061: Avoided setting a limit on a query for get with select_for_update on Oracle
Thanks Michael Miller for reporting the issue.
Diffstat (limited to 'tests/select_for_update')
-rw-r--r--tests/select_for_update/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py
index 54ba0d1d27..a0bd206923 100644
--- a/tests/select_for_update/tests.py
+++ b/tests/select_for_update/tests.py
@@ -265,3 +265,9 @@ class SelectForUpdateTests(TransactionTestCase):
self.assertEqual(router.db_for_write(Person), query.db)
finally:
router.routers = old_routers
+
+ @skipUnlessDBFeature('has_select_for_update')
+ def test_select_for_update_with_get(self):
+ with transaction.atomic():
+ person = Person.objects.select_for_update().get(name='Reinhardt')
+ self.assertEqual(person.name, 'Reinhardt')