Commit 3e1bb5cf authored by Tim Graham's avatar Tim Graham
Browse files

Refs #14476 -- Added a test for default annotation name access in aggregate.

Fixed in f59fd15c
parent 16a8d013
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1014,6 +1014,11 @@ class AggregationTests(TestCase):
            ['Peter Norvig'],
            lambda b: b.name
        )
        # Referencing the auto-generated name in an aggregate() also works.
        self.assertEqual(
            Author.objects.annotate(Count('book')).aggregate(Max('book__count')),
            {'book__count__max': 2}
        )

    def test_annotate_joins(self):
        """