Пример #1
0
 def test_longitude_field_with_validator(self):
     field = LongitudeField(validators=[foo_validator])
     name, path, args, kwargs = field.deconstruct()
     self.assertIsNone(name)
     self.assertEqual(path, 'osm_field.fields.LongitudeField')
     self.assertEqual(args, [])
     self.assertEqual(kwargs, {'validators': [foo_validator, validate_longitude]})
Пример #2
0
 def test_longitude_field_with_validator(self):
     field = LongitudeField(validators=[foo_validator])
     name, path, args, kwargs = field.deconstruct()
     self.assertIsNone(name)
     self.assertEqual(path, "osm_field.fields.LongitudeField")
     self.assertEqual(args, [])
     self.assertEqual(kwargs, {"validators": [foo_validator, validate_longitude]})
Пример #3
0
 def test_longitude_field(self):
     field = LongitudeField()
     name, path, args, kwargs = field.deconstruct()
     self.assertIsNone(name)
     self.assertEqual(path, 'osm_field.fields.LongitudeField')
     self.assertEqual(args, [])
     self.assertEqual(kwargs, {'validators': [validate_longitude]})