diff --git a/plugin/teksi_wastewater/tests/data/minimal-dataset-SIA405-ABWASSER-modified.xtf b/plugin/teksi_wastewater/tests/data/minimal-dataset-SIA405-ABWASSER-modified.xtf index b0a8c5dea..93b1df228 100644 --- a/plugin/teksi_wastewater/tests/data/minimal-dataset-SIA405-ABWASSER-modified.xtf +++ b/plugin/teksi_wastewater/tests/data/minimal-dataset-SIA405-ABWASSER-modified.xtf @@ -25,6 +25,18 @@ PAA.Sammelkanal Freispiegelleitung + + + 20240104 + + + 2024 + ch000000RE000002 + in_Betrieb + + + PAA.Sammelkanal + Freispiegelleitung 20240104 @@ -50,6 +62,16 @@ Kontroll_Einsteigschacht + + 20240104 + + + 2024 + Test3 + in_Betrieb + + + 20240104 @@ -57,6 +79,14 @@ Kreisprofil 1.00 Kreisprofil + + + 20240104 + + + Rechteckprofil_2_1 + 2.00 + Rechteckprofil 20240104 @@ -79,6 +109,28 @@ 2745935.9321267519.317 + + + 20240104 + + + Test2-Test3F + 447.510 + + 2745935.9321267519.317 + + + + + 20240104 + + + Test2-Test3T + 447.500 + + 2745935.9321267529.317 + + 20240104 @@ -101,6 +153,17 @@ 2745935.9321267519.317 447.510 + + + 20240104 + + + Test3 + + + 2745935.9321267529.317 + + 447.500 20240911 @@ -121,6 +184,26 @@ + + + 20240911 + + + selected_on_test_export + Test2-Test3 + + 10.00 + 300 + Kunststoff_Polyvinilchlorid + + + 2745935.9321267519.317 + 2745935.9321267529.317 + + + + + 20240104 @@ -144,6 +227,17 @@ 2745935.9321267519.317 + + 20240104 + + + Test3 + + 450.500 + + 2745935.9321267519.317 + + diff --git a/plugin/teksi_wastewater/tests/test_interlis.py b/plugin/teksi_wastewater/tests/test_interlis.py index d03ea699b..db0c96678 100644 --- a/plugin/teksi_wastewater/tests/test_interlis.py +++ b/plugin/teksi_wastewater/tests/test_interlis.py @@ -223,6 +223,29 @@ def test_minimal_import_export(self): self.assertIsNotNone(result) self.assertEqual(result[0], 448.0) + # Export selection of minimal dss + export_xtf_file = self._get_output_filename("export_minimal_dataset_dss_selection") + interlisImporterExporter.interlis_export( + xtf_file_output=self._get_output_filename(export_xtf_file), + export_models=[config.MODEL_NAME_DSS], + logs_next_to_file=True, + selected_ids=["ch000000WN000002", "ch000000WN000003", "ch000000RE000002"], + ) + + # Check exported TID + export_xtf_file = self._get_output_filename("export_minimal_dataset_dss_selection") + exported_xtf_filename = self._get_output_filename( + f"{export_xtf_file}_{config.MODEL_NAME_DSS}.xtf" + ) + interlis_object = self._get_xtf_object( + exported_xtf_filename, config.TOPIC_NAME_DSS, "Rohrprofil", "ch000000PP000001" + ) + self.assertIsNone(interlis_object) + interlis_object = self._get_xtf_object( + exported_xtf_filename, config.TOPIC_NAME_DSS, "Rohrprofil", "ch000000PP000002" + ) + self.assertIsNotNone(interlis_object) + def test_dss_dataset_import_export(self): # Import organisation xtf_file_input = self._get_data_filename(TEST_DATASET_ORGANISATIONS)