completed test_systems_catalog.py
This commit is contained in:
parent
f2d78c381e
commit
3a7f9173c7
@ -40,4 +40,24 @@ class TestSystemsCatalog(TestCase):
|
||||
|
||||
def test_north_america_systems_catalog(self):
|
||||
catalog = EnergySystemsCatalogFactory('north_america').catalog
|
||||
catalog_categories = catalog.names()
|
||||
archetypes = catalog.names('archetypes')
|
||||
self.assertEqual(6, len(archetypes['archetypes']))
|
||||
systems = catalog.names('systems')
|
||||
self.assertEqual(7, len(systems['systems']))
|
||||
generation_equipments = catalog.names('generation_equipments')
|
||||
self.assertEqual(21, len(generation_equipments['generation_equipments']))
|
||||
storage_equipments = catalog.names('storage_equipments')
|
||||
self.assertEqual(6, len(storage_equipments['storage_equipments']))
|
||||
with self.assertRaises(ValueError):
|
||||
catalog.names('unknown')
|
||||
|
||||
# retrieving all the entries should not raise any exceptions
|
||||
for category in catalog_categories:
|
||||
for value in catalog_categories[category]:
|
||||
catalog.get_entry(value)
|
||||
|
||||
print(catalog.entries())
|
||||
|
||||
with self.assertRaises(IndexError):
|
||||
catalog.get_entry('unknown')
|
||||
|
Loading…
Reference in New Issue
Block a user