MCPcopy
hub / github.com/django/django / test_combined_lookups

Method test_combined_lookups

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

Source from the content-addressed store, hash-verified

1845 )
1846
1847 def test_combined_lookups(self):
1848 expression = Exact(F("year"), 1942) | GreaterThan(F("year"), 1942)
1849 qs = Season.objects.annotate(gte=expression)
1850 self.assertCountEqual(
1851 qs.values_list("year", "gte"),
1852 ((1942, True), (1842, False), (2042, True)),
1853 )
1854
1855 def test_lookup_in_filter(self):
1856 qs = Season.objects.filter(GreaterThan(F("year"), 1910))

Callers

nothing calls this directly

Calls 5

ExactClass · 0.90
FClass · 0.90
GreaterThanClass · 0.90
annotateMethod · 0.80
values_listMethod · 0.80

Tested by

no test coverage detected