MCPcopy
hub / github.com/django/django / test_deconstruct_boolean_expression

Method test_deconstruct_boolean_expression

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

Source from the content-addressed store, hash-verified

172 self.assertEqual(kwargs, {})
173
174 def test_deconstruct_boolean_expression(self):
175 expr = RawSQL("1 = 1", BooleanField())
176 q = Q(expr)
177 _, args, kwargs = q.deconstruct()
178 self.assertEqual(args, (expr,))
179 self.assertEqual(kwargs, {})
180
181 def test_reconstruct(self):
182 q = Q(price__gt=F("discounted_price"))

Callers

nothing calls this directly

Calls 4

deconstructMethod · 0.95
RawSQLClass · 0.90
BooleanFieldClass · 0.90
QClass · 0.90

Tested by

no test coverage detected