def test_bad_indicator(self):
     emsg = 'unsupported time range'
     with self.assertRaisesRegexp(TranslationError, emsg):
         time_range_unit(-1)
Пример #2
0
 def test_bad_indicator(self):
     emsg = 'unsupported time range'
     with self.assertRaisesRegexp(TranslationError, emsg):
         time_range_unit(-1)
 def test_units(self):
     for indicator, unit in self.unit_by_indicator.items():
         result = time_range_unit(indicator)
         self.assertEqual(result, unit)
Пример #4
0
 def test_units(self):
     for indicator, unit in self.unit_by_indicator.items():
         result = time_range_unit(indicator)
         self.assertEqual(result, unit)