mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.
This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
committed by
Mariusz Felisiak
parent
13b6fff117
commit
3f7b327562
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user