Refs #32168 -- Fixed Publisher assertions in AggregationTests.test_more_more.

Refer to Publisher objects instead of Books.

Test regression in 1bf25e9bc6.
This commit is contained in:
Christopher Wang 2020-11-03 22:38:16 -08:00 committed by Mariusz Felisiak
parent 18c8ced81e
commit 77e93d3b20
1 changed files with 4 additions and 4 deletions

View File

@ -701,10 +701,10 @@ class AggregationTests(TestCase):
qs = Book.objects.extra(select={'pub': 'publisher_id'}).values('pub').annotate(Count('id')).order_by('pub')
self.assertSequenceEqual(
qs, [
{'pub': self.b1.id, 'id__count': 2},
{'pub': self.b2.id, 'id__count': 1},
{'pub': self.b3.id, 'id__count': 2},
{'pub': self.b4.id, 'id__count': 1}
{'pub': self.p1.id, 'id__count': 2},
{'pub': self.p2.id, 'id__count': 1},
{'pub': self.p3.id, 'id__count': 2},
{'pub': self.p4.id, 'id__count': 1},
],
)