MCPcopy
hub / github.com/django/django / test_exact_exists

Method test_exact_exists

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

Source from the content-addressed store, hash-verified

1673 )
1674
1675 def test_exact_exists(self):
1676 qs = Article.objects.filter(pk=OuterRef("pk"))
1677 seasons = Season.objects.annotate(pk_exists=Exists(qs)).filter(
1678 pk_exists=Exists(qs),
1679 )
1680 self.assertCountEqual(seasons, Season.objects.all())
1681
1682 def test_nested_outerref_lhs(self):
1683 tag = Tag.objects.create(name=self.au1.alias)

Callers

nothing calls this directly

Calls 5

OuterRefClass · 0.90
ExistsClass · 0.90
annotateMethod · 0.80
filterMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected