From 3f7b3275627385f8f7531fca01cdda50d4ec6b6e Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Sun, 18 Oct 2020 18:29:52 +0200 Subject: Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly. This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby Co-authored-by: Mariusz Felisiak --- tests/aggregation/tests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/aggregation') diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py index 62704c4bd2..43fd9dd074 100644 --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -750,13 +750,13 @@ class AggregateTestCase(TestCase): number of authors. """ dates = Book.objects.annotate(num_authors=Count("authors")).dates('pubdate', 'year') - self.assertQuerysetEqual( + self.assertSequenceEqual( dates, [ - "datetime.date(1991, 1, 1)", - "datetime.date(1995, 1, 1)", - "datetime.date(2007, 1, 1)", - "datetime.date(2008, 1, 1)" - ] + datetime.date(1991, 1, 1), + datetime.date(1995, 1, 1), + datetime.date(2007, 1, 1), + datetime.date(2008, 1, 1), + ], ) def test_values_aggregation(self): -- cgit v1.3