MCPcopy
hub / github.com/django/django / test_names_to_path_field

Method test_names_to_path_field

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

Source from the content-addressed store, hash-verified

191 self.assertEqual(result[0], 1)
192
193 def test_names_to_path_field(self):
194 query = Query(None)
195 query.add_annotation(Value(True), "value")
196 path, final_field, targets, names = query.names_to_path(["value"], opts=None)
197 self.assertEqual(path, [])
198 self.assertIsInstance(final_field, BooleanField)
199 self.assertEqual(len(targets), 1)
200 self.assertIsInstance(targets[0], BooleanField)
201 self.assertEqual(names, [])
202
203 def test_names_to_path_field_error(self):
204 query = Query(None)

Callers

nothing calls this directly

Calls 4

add_annotationMethod · 0.95
names_to_pathMethod · 0.95
QueryClass · 0.90
ValueClass · 0.90

Tested by

no test coverage detected