Ejemplo n.º 1
0
 def test_bad_indicator(self):
     emsg = 'unsupported time range'
     with self.assertRaisesRegexp(TranslationError, emsg):
         time_range_unit(-1)
Ejemplo n.º 2
0
 def test_bad_indicator(self):
     emsg = 'unsupported time range'
     with self.assertRaisesRegexp(TranslationError, emsg):
         time_range_unit(-1)
Ejemplo n.º 3
0
 def test_units(self):
     for indicator, unit in self.unit_by_indicator.items():
         result = time_range_unit(indicator)
         self.assertEqual(result, unit)
Ejemplo n.º 4
0
 def test_units(self):
     for indicator, unit in self.unit_by_indicator.items():
         result = time_range_unit(indicator)
         self.assertEqual(result, unit)