summaryrefslogtreecommitdiff
path: root/tests/distinct_on_fields
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2016-09-10 11:36:27 +0200
committerTim Graham <timograham@gmail.com>2016-09-13 10:07:37 -0400
commit0c1f71635f8a3f32195e1573fe929c7d88a78511 (patch)
tree4d8127fde3634dfd3d4ad8451cee140d34070821 /tests/distinct_on_fields
parent8b050cf9dcad3db39cc9ef44906bfc39f5aa3d25 (diff)
downloaddjango-0c1f71635f8a3f32195e1573fe929c7d88a78511.tar.gz
Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with assertSequenceEqual().
Diffstat (limited to 'tests/distinct_on_fields')
-rw-r--r--tests/distinct_on_fields/tests.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/distinct_on_fields/tests.py b/tests/distinct_on_fields/tests.py
index f999f76c4a..e7445003ce 100644
--- a/tests/distinct_on_fields/tests.py
+++ b/tests/distinct_on_fields/tests.py
@@ -116,16 +116,10 @@ class DistinctOnTests(TestCase):
def test_distinct_on_in_ordered_subquery(self):
qs = Staff.objects.distinct('name').order_by('name', 'id')
qs = Staff.objects.filter(pk__in=qs).order_by('name')
- self.assertQuerysetEqual(
- qs, [self.p1_o1, self.p2_o1, self.p3_o1],
- lambda x: x
- )
+ self.assertSequenceEqual(qs, [self.p1_o1, self.p2_o1, self.p3_o1])
qs = Staff.objects.distinct('name').order_by('name', '-id')
qs = Staff.objects.filter(pk__in=qs).order_by('name')
- self.assertQuerysetEqual(
- qs, [self.p1_o2, self.p2_o1, self.p3_o1],
- lambda x: x
- )
+ self.assertSequenceEqual(qs, [self.p1_o2, self.p2_o1, self.p3_o1])
def test_distinct_on_get_ordering_preserved(self):
"""