diff options
author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2017-08-08 23:38:43 +0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-08-08 14:38:43 -0400 |
commit | c754bdc45bdcd9b2a03d4e3e10ea2a742456de91 (patch) | |
tree | 0c6c3a98d4e650f021ba99a637b20c8bce9662e2 /tests/extra_regress | |
parent | b8731c3fff3f36ed96655e74ab1c86263eba0119 (diff) | |
download | django-c754bdc45bdcd9b2a03d4e3e10ea2a742456de91.tar.gz |
Refs #7070 -- Improved test for extra(), values(), distinct() and ordering() all together.
Tested that the extra select that appears in the select clause only because of
distinct() and order_by() doesn't appear in the result values.
Diffstat (limited to 'tests/extra_regress')
-rw-r--r-- | tests/extra_regress/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/extra_regress/tests.py b/tests/extra_regress/tests.py index 53106fa249..e225d8cd62 100644 --- a/tests/extra_regress/tests.py +++ b/tests/extra_regress/tests.py @@ -433,4 +433,5 @@ class ExtraRegressTests(TestCase): self.assertSequenceEqual(qs.order_by('-second_extra'), [t2.pk, t1.pk]) # Note: the extra ordering must appear in select clause, so we get two # non-distinct results here (this is on purpose, see #7070). - self.assertSequenceEqual(qs.order_by('-second_extra').values_list('first', flat=True), ['a', 'a']) + # Extra select doesn't appear in result values. + self.assertSequenceEqual(qs.order_by('-second_extra').values_list('first'), [('a',), ('a',)]) |