summaryrefslogtreecommitdiff
path: root/tests/aggregation
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-10-18 18:29:52 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-11-06 09:24:50 +0100
commit3f7b3275627385f8f7531fca01cdda50d4ec6b6e (patch)
treefb082d40e73f6c877911eab92229ac21cdfaa5bc /tests/aggregation
parent13b6fff11703a694e155b84d41d02822bbc0aaa0 (diff)
downloaddjango-3f7b3275627385f8f7531fca01cdda50d4ec6b6e.tar.gz
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>
Diffstat (limited to 'tests/aggregation')
-rw-r--r--tests/aggregation/tests.py12
1 files changed, 6 insertions, 6 deletions
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):