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.
This commit is contained in:
parent
b8731c3fff
commit
c754bdc45b
|
@ -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',)])
|
||||
|
|
Loading…
Reference in New Issue