summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorQuentinAndre <quentin.andre@imt-atlantique.net>2021-08-19 01:28:40 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-16 17:04:41 +0100
commit8bd44a470f51adafa5ae832e92a43da698bf0eb2 (patch)
tree3ce908f6e99d6c22bc4c59cfea6cfe44a1c3d2b1 /ishtar_common/tests.py
parentb96e22202a918fefb8677543dd5150b7534bf3f9 (diff)
downloadIshtar-8bd44a470f51adafa5ae832e92a43da698bf0eb2.tar.bz2
Ishtar-8bd44a470f51adafa5ae832e92a43da698bf0eb2.zip
stable version of setDefaultGeoItems
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 33a7bf2dc..c8bbf4342 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -3176,20 +3176,12 @@ class SeleniumTests(StaticLiveServerTestCase):
ope1 = create_operation(self.user)
ope2 = create_operation(self.user)
- pks = {'ope': {'Pt': ope1.pk, 'Poly': ope2.pk}, 'cr': {}, 'bf': {}}
+ pks = {'Pt': ope1.pk, 'Poly': ope2.pk}
- def merge_pks(dic1, dic2):
- for key in dic2.keys():
- for label in dic2[key]:
- dic1[key][label] = dic2[key][label]
-
- merge_pks(pks, GeomaticFindsTest.create_cr_with_bfs(ope1, "Point", "Point", ["Polygon", "Point"], "CR Pt Pt"))
- merge_pks(pks, GeomaticFindsTest.create_cr_with_bfs(ope1, "Point", "Polygon", ["Polygon", "Point"], "CR Pt Poly"))
- merge_pks(pks, GeomaticFindsTest.create_cr_with_bfs(ope2, "Polygon", "Point", ["Polygon", "Point"], "CR Poly Pt"))
- merge_pks(pks, GeomaticFindsTest.create_cr_with_bfs(ope2, "Polygon", "Polygon", ["Polygon", "Point"], "CR Poly Poly"))
-
- print('PKS AAAAAAAAAAAAAAAAA')
- print(pks)
+ pks.update(GeomaticFindsTest.create_cr_with_bfs(ope1, "Point", "Point", ["Polygon", "Point"], "CR Pt Pt"))
+ pks.update(GeomaticFindsTest.create_cr_with_bfs(ope1, "Point", "Polygon", ["Polygon", "Point"], "CR Pt Poly"))
+ pks.update(GeomaticFindsTest.create_cr_with_bfs(ope2, "Polygon", "Point", ["Polygon", "Point"], "CR Poly Pt"))
+ pks.update(GeomaticFindsTest.create_cr_with_bfs(ope2, "Polygon", "Polygon", ["Polygon", "Point"], "CR Poly Poly"))
geom_ope = [
[[[[1, 1], [5, 1], [5, 5], [1, 5], [1, 1]], [[2, 2], [2, 3], [3, 3], [3, 2], [2, 2]]],
@@ -3209,7 +3201,7 @@ class SeleniumTests(StaticLiveServerTestCase):
[4.42105, 2.73684],
[3.9, 2.9]
]
- return [geom_ope, geom_cr, geom_bf], [ope1.pk, ope2.pk]
+ return [geom_ope, geom_cr, geom_bf], pks
def scroll(self, element):