MCPcopy
hub / github.com/django/django / test_repr

Method test_repr

tests/constraints/tests.py:172–181  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170 )
171
172 def test_repr(self):
173 constraint = models.CheckConstraint(
174 condition=models.Q(price__gt=models.F("discounted_price")),
175 name="price_gt_discounted_price",
176 )
177 self.assertEqual(
178 repr(constraint),
179 "<CheckConstraint: condition=(AND: ('price__gt', F(discounted_price))) "
180 "name='price_gt_discounted_price'>",
181 )
182
183 def test_repr_with_violation_error_message(self):
184 constraint = models.CheckConstraint(

Callers

nothing calls this directly

Calls 1

FMethod · 0.80

Tested by

no test coverage detected