def test_find_supported_none(self):
     """
     Should return None if it can't find any supported locale.
     """
     assert find_supported('de') is None
     assert find_supported('fr') is None
     assert find_supported('dude') is None
 def test_find_supported_none(self):
     """
     Should return None if it can't find any supported locale.
     """
     assert find_supported('de') is None
     assert find_supported('fr') is None
     assert find_supported('dude') is None
 def test_find_supported(self):
     assert find_supported('en-CA') == 'en-US'
     assert find_supported('en-US') == 'en-US'
     assert find_supported('en-GB') == 'en-GB'
     assert find_supported('en') == 'en-US'
     assert find_supported('es-MX') == 'es-ES'
     assert find_supported('es-AR') == 'es-AR'
     assert find_supported('es') == 'es-ES'
 def test_find_supported(self):
     assert find_supported('en-CA') == 'en-US'
     assert find_supported('en-US') == 'en-US'
     assert find_supported('en-GB') == 'en-GB'
     assert find_supported('en') == 'en-US'
     assert find_supported('es-MX') == 'es-ES'
     assert find_supported('es-AR') == 'es-AR'
     assert find_supported('es') == 'es-ES'
Exemple #5
0
 def test_find_supported(self):
     assert find_supported("en-CA") == "en-US"
     assert find_supported("en-US") == "en-US"
     assert find_supported("en-GB") == "en-GB"
     assert find_supported("en") == "en-US"
     assert find_supported("es-MX") == "es-ES"
     assert find_supported("es-AR") == "es-AR"
     assert find_supported("es") == "es-ES"