From 9287da7a66e42a059844db1d3f85c744e2ec2bab Mon Sep 17 00:00:00 2001 From: guille Date: Mon, 11 Apr 2022 12:44:23 -0400 Subject: [PATCH] correct merge errors --- catalog_factories/construction_catalog_factory.py | 12 +++++++++++- unittests/test_construction_catalog.py | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/catalog_factories/construction_catalog_factory.py b/catalog_factories/construction_catalog_factory.py index 6787bac2..c9794029 100644 --- a/catalog_factories/construction_catalog_factory.py +++ b/catalog_factories/construction_catalog_factory.py @@ -18,12 +18,14 @@ class ConstructionCatalogFactory: self._catalog_type = '_' + file_type.lower() self._path = base_path + @property def _nrel(self): """ Retrieve NREL catalog """ return NrelCatalog(self._path) + @property def _nrcan(self): """ Retrieve NRCAN catalog @@ -36,4 +38,12 @@ class ConstructionCatalogFactory: Enrich the city given to the class using the class given handler :return: Catalog """ - return getattr(self, self._catalog_type, lambda: None) \ No newline at end of file + return getattr(self, self._catalog_type, lambda: None) + + @property + def catalog_debug(self) -> Catalog: + """ + Enrich the city given to the class using the class given handler + :return: Catalog + """ + return self._nrel() \ No newline at end of file diff --git a/unittests/test_construction_catalog.py b/unittests/test_construction_catalog.py index ed6867cd..8ee48cae 100644 --- a/unittests/test_construction_catalog.py +++ b/unittests/test_construction_catalog.py @@ -6,13 +6,13 @@ Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ from unittest import TestCase -from catalogs.construction_catalog_factory import ConstructionCatalogFactory +from catalog_factories.construction_catalog_factory import ConstructionCatalogFactory class TestConstructionCatalog(TestCase): def test_nrel_catalog(self): - catalog = ConstructionCatalogFactory('nrel').catalog_debug + catalog = ConstructionCatalogFactory('nrel').catalog catalog_categories = catalog.names() constructions = catalog.names('constructions') windows = catalog.names('windows')