Ejemplo n.º 1
0
 def test_generate(self):
     try:
         self.assertDictEqual(generate_map(), CLDR_TO_MS_TIMEZONE_MAP)
     except CONNECTION_ERRORS:
         # generate_map() requires access to unicode.org, which may be unavailable. Don't fail test, since this is
         # out of our control.
         pass
Ejemplo n.º 2
0
 def test_generate(self):
     try:
         version, tz_map = generate_map()
     except CONNECTION_ERRORS:
         # generate_map() requires access to unicode.org, which may be unavailable. Don't fail test, since this is
         # out of our control.
         return
     self.assertEqual(version, CLDR_WINZONE_VERSION)
     self.assertDictEqual(tz_map, CLDR_TO_MS_TIMEZONE_MAP)
Ejemplo n.º 3
0
 def test_generate_failure(self, m):
     m.get(CLDR_WINZONE_URL, status_code=500)
     with self.assertRaises(ValueError):
         generate_map()