diff options
| author | Shai Berger <shai@platonix.com> | 2014-08-01 01:36:06 +0300 |
|---|---|---|
| committer | Shai Berger <shai@platonix.com> | 2014-08-05 03:21:25 +0300 |
| commit | f3c0cb0120aa5805daa880f18b24f40bacde651f (patch) | |
| tree | a8b60b3640f69ee61a8c9317aef4779df0064d7b /tests | |
| parent | a582431b414295ad4cabf0dc8d76229512a459df (diff) | |
[1.7.x] Fixed #23061: Avoided setting a limit on a query for get with select_for_update on Oracle
Thanks Michael Miller for reporting the issue.
Backport of 746f2a4bed from master
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/select_for_update/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py index 5d126844d2..3fae8c9ffe 100644 --- a/tests/select_for_update/tests.py +++ b/tests/select_for_update/tests.py @@ -292,3 +292,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') |
