summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorThomas André <thomas.andre@iggdrasil.net>2025-06-10 11:54:22 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-07-29 08:49:03 +0200
commite0e2cc9c916a122cc6e810620bbc5fda974f41bd (patch)
tree7478b74edf3171bd349c86f96f53f80d98b057af /ishtar_common/tests.py
parentedf13b44cc8f9d73b7be4574affe57faf5d07e6d (diff)
downloadIshtar-e0e2cc9c916a122cc6e810620bbc5fda974f41bd.tar.bz2
Ishtar-e0e2cc9c916a122cc6e810620bbc5fda974f41bd.zip
Corrections in the importation of SIG data + Application of modifications and optimisation for the exportation of SIG data
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 909380e77..3540f9cfe 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -2862,14 +2862,15 @@ class BaseImportTest(TestCase):
# List of modified and new values to verify the absence/presence depending on the situation
if mode == 1:
old = ['champ_id', 'champ_ue', 'champ_x', 'champ_y', 'champ_z', 'champ_wkt_modif', 'champ_nom', 'champ_ope',
- 'champ_insee', 'champ_parc', 'champ_type', 'champ_occup', 'champ_desc', 'champ_loca', 'champ_media_cr',
- 'champ_periode', 'champ_acti', 'champ_geom']
+ 'champ_insee', 'champ_section', 'champ_parc', 'champ_type', 'champ_occup', 'champ_desc', 'champ_loca',
+ 'champ_media_cr', 'champ_periode', 'champ_acti', 'champ_geom']
new = ['Identifiant', 'UE', 'X', 'Y', 'Z', 'WKT_point', 'Unité_Enregistrement', 'Opération', 'INSEE_Commune',
- 'Parcelle', 'Type', 'Interprétation', 'Description', 'Localisation', 'Media', 'Periode', 'Type_Activité', 'WKT']
+ 'Section', 'Parcelle', 'Type', 'Interprétation', 'Description', 'Localisation', 'Media', 'Periode', 'Type_Activité', 'WKT']
if mode == 2:
- old = ['champ_id', 'champ_ue', 'champ_wkt_simple', 'champ_nom', 'champ_ope', 'champ_insee', 'champ_parc',
- 'champ_type', 'champ_occup', 'champ_desc', 'champ_loca', 'champ_media_cr', 'champ_periode', 'champ_acti', 'champ_geom']
- new = ['Identifiant', 'UE', 'WKT_point', 'Unité_Enregistrement', 'Opération', 'INSEE_Commune', 'Parcelle',
+ old = ['champ_id', 'champ_ue', 'champ_wkt_simple', 'champ_nom', 'champ_ope', 'champ_insee', 'champ_section',
+ 'champ_parc', 'champ_type', 'champ_occup', 'champ_desc', 'champ_loca', 'champ_media_cr',
+ 'champ_periode', 'champ_acti', 'champ_geom']
+ new = ['Identifiant', 'UE', 'WKT_point', 'Unité_Enregistrement', 'Opération', 'INSEE_Commune', 'Section', 'Parcelle',
'Type', 'Interprétation', 'Description', 'Localisation', 'Media', 'Periode', 'Type_Activité', 'WKT']
if mode == 3:
old = ['champ_nom', 'champ_ope', 'champ_geom', 'champ_id', 'champ_ue', 'champ_date', 'champ_x', 'champ_y',
@@ -2878,13 +2879,10 @@ class BaseImportTest(TestCase):
with open(new_qgs, 'r', encoding='utf-8') as file:
style = file.read()
for elem in old:
- print(mode, elem)
bool = f'name="{elem}"' in style
self.assertEqual(bool, False)
for elem in new:
bool = f'name="{elem}"' in style
- if not bool:
- print(elem)
self.assertEqual(bool, True)
for file in dir_list:
os.remove(os.path.join(folder, file))