summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-04-08 23:54:50 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-04-24 19:42:35 +0200
commitc831f58beebde59be63227217ed20acfdcf60c79 (patch)
tree6401e6bbeb1c98dbf0a9a88817d2163c0be67305
parent746d25570b885a90895fb2783a8c624406c4ba24 (diff)
downloadIshtar-c831f58beebde59be63227217ed20acfdcf60c79.tar.bz2
Ishtar-c831f58beebde59be63227217ed20acfdcf60c79.zip
Fix geo tests
-rw-r--r--archaeological_finds/tests.py7
-rw-r--r--ishtar_common/tests.py3
2 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 929cdfeff..4713f2bcd 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -1582,6 +1582,9 @@ class GeomaticTest(FindInit, TestCase):
txt_idx='wgs84', defaults={"srid": 4326, "label": 'WGS84',
'auth_name': 'EPSG'}
)
+ profile = get_current_profile()
+ profile.mapping = True
+ profile.save()
# db source
geom = GEOSGeometry('POINT({} {} {})'.format(2, 43, 1), srid=4326)
@@ -1707,6 +1710,10 @@ class GeomaticTest(FindInit, TestCase):
unicode(models.BaseFind._meta.verbose_name))
def test_post_save_polygon(self):
+ profile = get_current_profile()
+ profile.mapping = True
+ profile.save()
+
find = self.finds[0]
base_find = find.base_finds.all()[0]
srs, __ = SpatialReferenceSystem.objects.get_or_create(
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 17cc874fe..0599a1599 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -1591,6 +1591,9 @@ class GeomaticTest(TestCase):
def save(self, *args, **kwargs):
pass
+ profile = models.get_current_profile()
+ profile.mapping = True
+ profile.save()
srs = models.SpatialReferenceSystem.objects.create(
label='WGS84', txt_idx='wgs84', srid=4326