diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-03-19 10:31:10 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-17 13:21:27 +0200 |
commit | b5bce39917ae19ac183dcbf48bf991f57caa3697 (patch) | |
tree | 3dd6b8a325f1f8c2564bb73ed9dd613ebfae7420 /ishtar_common | |
parent | de08b6afe26f2d954248482f89030b16d1d58b94 (diff) | |
download | Ishtar-b5bce39917ae19ac183dcbf48bf991f57caa3697.tar.bz2 Ishtar-b5bce39917ae19ac183dcbf48bf991f57caa3697.zip |
Fix geo test
Diffstat (limited to 'ishtar_common')
-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) |