MCPcopy
hub / github.com/django/django / test_get_bound_params

Method test_get_bound_params

tests/lookup/test_lookups.py:50–59  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48
49class YearLookupTests(SimpleTestCase):
50 def test_get_bound_params(self):
51 look_up = YearLookup(
52 lhs=Value(datetime(2010, 1, 1, 0, 0, 0), output_field=DateTimeField()),
53 rhs=Value(datetime(2010, 1, 1, 23, 59, 59), output_field=DateTimeField()),
54 )
55 msg = "subclasses of YearLookup must provide a get_bound_params() method"
56 with self.assertRaisesMessage(NotImplementedError, msg):
57 look_up.get_bound_params(
58 datetime(2010, 1, 1, 0, 0, 0), datetime(2010, 1, 1, 23, 59, 59)
59 )

Callers

nothing calls this directly

Calls 5

get_bound_paramsMethod · 0.95
YearLookupClass · 0.90
ValueClass · 0.90
DateTimeFieldClass · 0.90
assertRaisesMessageMethod · 0.80

Tested by

no test coverage detected