summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorQuentinAndre <quentin.andre@imt-atlantique.net>2021-08-19 00:46:25 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-10-25 12:06:02 +0200
commitec6293ec037364f4863a4110d41b6dd538c567b5 (patch)
tree69df590d071635ea0de308e495681290c281815a /ishtar_common/tests.py
parentaabdb477b1a261085e045328a62165a48d3c0f90 (diff)
downloadIshtar-ec6293ec037364f4863a4110d41b6dd538c567b5.tar.bz2
Ishtar-ec6293ec037364f4863a4110d41b6dd538c567b5.zip
create_cr_with_bfs returns pks
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 1ab718590..33a7bf2dc 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -3137,7 +3137,6 @@ class SeleniumTests(StaticLiveServerTestCase):
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
- from archaeological_operations.models import Operation
@classmethod
def setUpClass(cls):
@@ -3177,10 +3176,20 @@ class SeleniumTests(StaticLiveServerTestCase):
ope1 = create_operation(self.user)
ope2 = create_operation(self.user)
- GeomaticFindsTest.create_cr_with_bfs(ope1, "Point", "Point", ["Polygon", "Point"], "CR Pt Poly Pt")
- GeomaticFindsTest.create_cr_with_bfs(ope1, "Point", "Polygon", ["Polygon", "Point"], "CR Poly Poly Pt")
- GeomaticFindsTest.create_cr_with_bfs(ope2, "Polygon", "Point", ["Polygon", "Point"], "CR Pt Poly Pt")
- GeomaticFindsTest.create_cr_with_bfs(ope2, "Polygon", "Polygon", ["Polygon", "Point"], "CR Poly Poly Pt")
+ pks = {'ope': {'Pt': ope1.pk, 'Poly': ope2.pk}, 'cr': {}, 'bf': {}}
+
+ 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)
geom_ope = [
[[[[1, 1], [5, 1], [5, 5], [1, 5], [1, 1]], [[2, 2], [2, 3], [3, 3], [3, 2], [2, 2]]],
@@ -3191,7 +3200,7 @@ class SeleniumTests(StaticLiveServerTestCase):
geom_cr = [
[[[[2, 1], [5, 1], [5, 5], [1, 5], [2, 1]], [[2, 2], [2, 3], [3, 3], [3, 2], [2, 2]]],
[[[6, 3], [9, 2], [9, 4], [6, 3]]]],
- [3.86111, 3.02778], #TODO: change it
+ [4.17708, 3.11458],
[3.9, 3]
]
geom_bf = [
@@ -3200,7 +3209,8 @@ class SeleniumTests(StaticLiveServerTestCase):
[4.42105, 2.73684],
[3.9, 2.9]
]
- return [geom_ope, geom_cr, geom_bf]
+ return [geom_ope, geom_cr, geom_bf], [ope1.pk, ope2.pk]
+
def scroll(self, element):
self.selenium.execute_script(