def test_get_resclass_name_for_current_units(self): data = { 'Kbit/sec': 'rc.saas.resource.kbps', 'kb': 'rc.saas.resource', 'mb-h': 'rc.saas.resource.mbh', 'mhz': 'rc.saas.resource.mhz', 'mhzh': 'rc.saas.resource.mhzh', 'unit': 'rc.saas.resource.unit', 'unit-h': 'rc.saas.resource.unith' } for key, value in data.items(): self.assertEqual(Hub._get_resclass_name(key), value)
def test_get_resclass_name_without_unit(self): self.assertEqual( Hub._get_resclass_name(''), 'rc.saas.resource.unit', )
def test_get_resclass_name_for_new_unit(self): self.assertEqual( Hub._get_resclass_name('new-unit'), 'rc.saas.resource.unit', )