def test_clean(self): w = RangeWidget() f = RangeField(widget=w) self.assertEqual( f.clean(['12.34', '55']), slice(to_d(12.34), to_d(55)))
def test_clean(self): w = RangeWidget() f = RangeField(widget=w, required=False) self.assertEqual(f.clean(['12.34', '55']), slice(to_d(12.34), to_d(55))) self.assertIsNone(f.clean([]))
def test_clean(self): w = RangeWidget() f = RangeField(widget=w, required=False) self.assertEqual( f.clean(['12.34', '55']), slice(to_d(12.34), to_d(55))) self.assertIsNone(f.clean([]))
def test_field(self): f = RangeField() self.assertEqual(len(f.fields), 2)