MCPcopy
hub / github.com/django/django / test_aggregate_combined_lookup

Method test_aggregate_combined_lookup

tests/lookup/tests.py:1950–1953  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1948 self.assertSequenceEqual(qs, [self.s1, self.s3, self.s2])
1949
1950 def test_aggregate_combined_lookup(self):
1951 expression = Cast(GreaterThan(F("year"), 1900), models.IntegerField())
1952 qs = Season.objects.aggregate(modern=models.Sum(expression))
1953 self.assertEqual(qs["modern"], 2)
1954
1955 def test_conditional_expression(self):
1956 qs = Season.objects.annotate(

Callers

nothing calls this directly

Calls 4

CastClass · 0.90
GreaterThanClass · 0.90
FClass · 0.90
aggregateMethod · 0.80

Tested by

no test coverage detected