diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2018-06-18 14:22:27 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-06-20 09:29:06 -0400 |
| commit | b0fbfae09334554124e1dccb7559d10f36e2f84c (patch) | |
| tree | 151880d98ec39f04e921bbc689058232ef691831 /tests | |
| parent | d21d1f9e056e5617a30978aa4f95a0402bab174b (diff) | |
Fixed #29503 -- Made __in lookup keep order of values in query.
Regression in 86eccdc8b67728d84440a46e5bf62c78f2eddf6d.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lookup/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index 1d2a78c717..45360963b2 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -556,6 +556,10 @@ class LookupTests(TestCase): ): list(Article.objects.filter(id__in=Article.objects.using('other').all())) + def test_in_keeps_value_ordering(self): + query = Article.objects.filter(slug__in=['a%d' % i for i in range(1, 8)]).values('pk').query + self.assertIn(' IN (a1, a2, a3, a4, a5, a6, a7) ', str(query)) + def test_error_messages(self): # Programming errors are pointed out with nice error messages with self.assertRaisesMessage( |
