correct merge errors

This commit is contained in:
Guille Gutierrez 2022-04-11 12:44:23 -04:00
parent 8b952e3254
commit 9287da7a66
2 changed files with 13 additions and 3 deletions

View File

@ -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)
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()

View File

@ -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')