MCPcopy
hub / github.com/django/django / test_subquery_annotation

Method test_subquery_annotation

tests/queries/test_query.py:176–180  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

174 self.assertEqual(result[0], 1)
175
176 def test_subquery_annotation(self):
177 query = Query(None)
178 query.add_annotation(Exists(Item.objects.all()), "_check")
179 result = query.get_compiler(using=DEFAULT_DB_ALIAS).execute_sql(SINGLE)
180 self.assertEqual(result[0], 0)
181
182 @skipUnlessDBFeature("supports_boolean_expr_in_select_clause")
183 def test_q_annotation(self):

Callers

nothing calls this directly

Calls 6

add_annotationMethod · 0.95
get_compilerMethod · 0.95
QueryClass · 0.90
ExistsClass · 0.90
allMethod · 0.45
execute_sqlMethod · 0.45

Tested by

no test coverage detected