MCPcopy
hub / github.com/django/django / test_alias

Method test_alias

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

Source from the content-addressed store, hash-verified

1785 )
1786
1787 def test_alias(self):
1788 qs = Season.objects.alias(greater=GreaterThan(F("year"), 1910))
1789 self.assertCountEqual(qs.filter(greater=True), [self.s1, self.s3])
1790
1791 def test_annotate_value_greater_than_value(self):
1792 qs = Season.objects.annotate(greater=GreaterThan(Value(40), Value(30)))

Callers

nothing calls this directly

Calls 4

GreaterThanClass · 0.90
FClass · 0.90
aliasMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected