예제 #1
0
 def test_is_supported(self):
     assert localization.is_supported_locale("en")
     assert localization.is_supported_locale("en_US")
     assert localization.locale_supported_in_console("en")
     assert localization.locale_supported_in_console("en_US")
예제 #2
0
 def test_is_supported(self):
     self.assertTrue(localization.is_supported_locale("en"))
     self.assertTrue(localization.is_supported_locale("en_US"))
     self.assertTrue(localization.locale_supported_in_console("en"))
     self.assertTrue(localization.locale_supported_in_console("en_US"))
예제 #3
0
 def test_invalid_raise_decorator(self):
     with pytest.raises(localization.InvalidLocaleSpec):
         localization.get_native_name("blah")
     with pytest.raises(localization.InvalidLocaleSpec):
         localization.is_supported_locale("blah")