2022-05-17 22:22:40 -04:00
|
|
|
"""
|
|
|
|
TestUsageCatalog
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2022 Concordia CERC group
|
|
|
|
Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
|
|
|
"""
|
|
|
|
|
|
|
|
from unittest import TestCase
|
2023-01-24 10:51:50 -05:00
|
|
|
from hub.catalog_factories.usage_catalog_factory import UsageCatalogFactory
|
2022-05-17 22:22:40 -04:00
|
|
|
|
|
|
|
|
|
|
|
class TestConstructionCatalog(TestCase):
|
|
|
|
def test_comnet_catalog(self):
|
|
|
|
catalog = UsageCatalogFactory('comnet').catalog
|
|
|
|
self.assertIsNotNone(catalog, 'catalog is none')
|
2022-05-19 14:24:24 -04:00
|
|
|
content = catalog.entries()
|
2022-11-21 12:46:39 -05:00
|
|
|
self.assertEqual(32, len(content.usages), 'Wrong number of usages')
|
2022-11-15 08:38:41 -05:00
|
|
|
|
|
|
|
def test_nrcan_catalog(self):
|
2024-01-09 04:32:47 -05:00
|
|
|
catalog = UsageCatalogFactory('nrcan').catalog
|
2022-11-21 12:46:39 -05:00
|
|
|
self.assertIsNotNone(catalog, 'catalog is none')
|
|
|
|
content = catalog.entries()
|
2022-12-16 07:21:33 -05:00
|
|
|
self.assertEqual(34, len(content.usages), 'Wrong number of usages')
|
2024-10-29 06:36:47 -04:00
|
|
|
|
|
|
|
def test_palma_catalog(self):
|
|
|
|
catalog = UsageCatalogFactory('palma').catalog
|
|
|
|
self.assertIsNotNone(catalog, 'catalog is none')
|
|
|
|
content = catalog.entries()
|
|
|
|
#print(catalog.entries())
|
|
|
|
self.assertEqual(1, len(content.usages), 'Wrong number of usages')
|
2024-12-12 16:22:02 -05:00
|
|
|
|
|
|
|
def test_cerc_catalog(self):
|
|
|
|
catalog = UsageCatalogFactory('cerc').catalog
|
|
|
|
self.assertIsNotNone(catalog, 'catalog is none')
|
|
|
|
content = catalog.entries()
|
|
|
|
self.assertEqual(34, len(content.usages), 'Wrong number of usages')
|