MCPcopy
hub / github.com/django/django / test_expression

Method test_expression

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

Source from the content-addressed store, hash-verified

365 self.assertIs(q.check({"price": 10}), False)
366
367 def test_expression(self):
368 q = Q(name="test")
369 self.assertIs(q.check({"name": Lower(Value("TeSt"))}), True)
370 self.assertIs(q.check({"name": Value("other")}), False)
371
372 def test_missing_field(self):
373 q = Q(description__startswith="prefix")

Callers

nothing calls this directly

Calls 4

checkMethod · 0.95
QClass · 0.90
LowerClass · 0.90
ValueClass · 0.90

Tested by

no test coverage detected