MCPcopy
hub / github.com/django/django / test_annotate_values_count

Method test_annotate_values_count

tests/expressions/tests.py:168–170  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

166 )
167
168 def test_annotate_values_count(self):
169 companies = Company.objects.annotate(foo=RawSQL("%s", ["value"]))
170 self.assertEqual(companies.count(), 3)
171
172 @skipUnlessDBFeature("supports_boolean_expr_in_select_clause")
173 def test_filtering_on_annotate_that_uses_q(self):

Callers

nothing calls this directly

Calls 3

RawSQLClass · 0.90
annotateMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected