Exemplo n.º 1
0
 def test_SpatialLocationField(self):
     instance = SpatialLocationField()
     self.assertIsInstance(instance, SpatialLocationField)
     name, path, args, kwargs = instance.deconstruct()
     new_instance = SpatialLocationField(*args, **kwargs)
     self.assertEqual(instance.map_attrs, new_instance.map_attrs)
Exemplo n.º 2
0
 def test_form_field(self):
     instance = SpatialLocationField()
     self.assertTrue(isinstance(instance.formfield(), FormSpatialLocationField))
Exemplo n.º 3
0
class SomeLocationModel(models.Model):
    location = SpatialLocationField()