def get_unit(name): unit_abbr = get_unit_abbr(name) if unit_abbr in UNITS_ABBR.keys(): return UNITS_ABBR[unit_abbr] else: return FILLER
def test_get_unit_abbr(self): self.assertEqual(get_unit_abbr('PROD_E_TWh'), 'TWh')
def test_get_unit_abbr(): assert get_unit_abbr('PROD_E_TWh') == 'TWh'