diff options
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r-- | ishtar_common/tests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 36df516ec..7cc802ec9 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -1715,6 +1715,8 @@ class IshtarBasicTest(TestCase): class GeomaticTest(TestCase): def test_post_save_point(self): class FakeGeomaticObject(object): + _meta = models.GeoItem._meta + def __init__(self, x, y, z, spatial_reference_system, point=None, point_2d=None): self.x = x @@ -1725,6 +1727,7 @@ class GeomaticTest(TestCase): self.point_source_item = "" self.point = point self.point_2d = point_2d + self.pk = 42 def save(self, *args, **kwargs): pass @@ -1739,7 +1742,7 @@ class GeomaticTest(TestCase): x=2, y=3, z=4, spatial_reference_system=srs) self.assertIsNone(obj.point_2d) - post_save_geo(None, instance=obj) + post_save_geo(FakeGeomaticObject, instance=obj) self.assertIsNotNone(obj.point_2d) self.assertIsNotNone(obj.point) |