MCPcopy
hub / github.com/django/django / test_missing_field

Method test_missing_field

tests/queries/test_q.py:372–376  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

370 self.assertIs(q.check({"name": Value("other")}), False)
371
372 def test_missing_field(self):
373 q = Q(description__startswith="prefix")
374 msg = "Cannot resolve keyword 'description' into field."
375 with self.assertRaisesMessage(FieldError, msg):
376 q.check({"name": "test"})
377
378 def test_boolean_expression(self):
379 q = Q(ExpressionWrapper(Q(price__gt=20), output_field=BooleanField()))

Callers

nothing calls this directly

Calls 3

checkMethod · 0.95
QClass · 0.90
assertRaisesMessageMethod · 0.80

Tested by

no test coverage detected