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 | d689fa4bd8d600874a45898482e8b1e931077d25 (patch) | |
tree | 3dd6b8a325f1f8c2564bb73ed9dd613ebfae7420 | |
parent | e2ec8a3bf016f1cc1e86a9ddd8cfc6e4eadbc35f (diff) | |
download | Ishtar-d689fa4bd8d600874a45898482e8b1e931077d25.tar.bz2 Ishtar-d689fa4bd8d600874a45898482e8b1e931077d25.zip |
Fix geo test
-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) |