summaryrefslogtreecommitdiff
path: root/tests/extra_regress/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extra_regress/tests.py')
-rw-r--r--tests/extra_regress/tests.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/extra_regress/tests.py b/tests/extra_regress/tests.py
index 6a0d7039ae..acf66d4af6 100644
--- a/tests/extra_regress/tests.py
+++ b/tests/extra_regress/tests.py
@@ -169,10 +169,9 @@ class ExtraRegressTests(TestCase):
when=datetime.datetime(2008, 9, 28, 10, 30, 0)
)
- self.assertQuerysetEqual(
+ self.assertSequenceEqual(
RevisionableModel.objects.extra(select={"the_answer": 'id'}).datetimes('when', 'month'),
[datetime.datetime(2008, 9, 1, 0, 0)],
- transform=lambda d: d,
)
def test_values_with_extra(self):
@@ -432,12 +431,8 @@ class ExtraRegressTests(TestCase):
qs = TestObject.objects.extra(
select={'second_extra': 'second'}
).values_list('id', flat=True).distinct()
- self.assertQuerysetEqual(
- qs.order_by('second_extra'), [t1.pk, t2.pk], lambda x: x)
- self.assertQuerysetEqual(
- qs.order_by('-second_extra'), [t2.pk, t1.pk], lambda x: x)
+ self.assertSequenceEqual(qs.order_by('second_extra'), [t1.pk, t2.pk])
+ 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.assertQuerysetEqual(
- qs.order_by('-second_extra').values_list('first', flat=True),
- ['a', 'a'], lambda x: x)
+ self.assertSequenceEqual(qs.order_by('-second_extra').values_list('first', flat=True), ['a', 'a'])