From 1279dffff8abadf7c9f7a0060aedc0449f2d386c Mon Sep 17 00:00:00 2001 From: s_ranjbar Date: Mon, 1 Jul 2024 12:16:26 -0400 Subject: [PATCH] fix: small issue in the city creator was resolved --- tests/test_geometry_factory.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_geometry_factory.py b/tests/test_geometry_factory.py index d436851c..2d8d0412 100644 --- a/tests/test_geometry_factory.py +++ b/tests/test_geometry_factory.py @@ -8,7 +8,7 @@ from pathlib import Path from unittest import TestCase import hub.exports.exports_factory -from hub.helpers.dictionaries import MontrealFunctionToHubFunction +from hub.helpers.dictionaries import Dictionaries from hub.helpers.geometry_helper import GeometryHelper from hub.imports.construction_factory import ConstructionFactory from hub.imports.geometry_factory import GeometryFactory @@ -36,6 +36,7 @@ class TestGeometryFactory(TestCase): height_field=height_field, year_of_construction_field=year_of_construction_field, function_field=function_field, + function_to_hub=Dictionaries().montreal_function_to_hub_function ).city self.assertIsNotNone(self._city, 'city is none') return self._city @@ -104,6 +105,7 @@ class TestGeometryFactory(TestCase): """ file = 'FZK_Haus_LoD_2.gml' city = self._get_city(file, 'citygml') + print('test') self.assertTrue(len(city.buildings) == 1) self._check_buildings(city) for building in city.buildings: @@ -132,7 +134,7 @@ class TestGeometryFactory(TestCase): year_of_construction_field='ANNEE_CONS', aliases_field=['ID_UEV', 'CIVIQUE_DE', 'NOM_RUE'], function_field='CODE_UTILI', - function_to_hub=MontrealFunctionToHubFunction().dictionary).city + function_to_hub=Dictionaries().montreal_function_to_hub_function).city hub.exports.exports_factory.ExportsFactory('obj', city, self._output_path).export() for building in city.building_alias('01002777'): self.assertEqual('1', building.name, 'Wrong building name when looking for alias')