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")
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"))
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")