def test_first_supported_locale_for_language(self): """ If the given locale is not supported, iterate through the supported locales and return the first one that matches the language. """ eq_(get_fb_like_locale('es-AR'), 'es_ES')
def facebook_locale(request): return {'facebook_locale': get_fb_like_locale(get_locale(request))}
def test_unsupported_locale(self): """ Return the default en_US when locale isn't supported. """ eq_(get_fb_like_locale('zz-ZZ'), 'en_US')
def test_supported_locale(self): """ Return the given locale if supported. """ eq_(get_fb_like_locale('en-PI'), 'en_PI')
def test_supported_locale(self): """ Return the given locale if supported. """ assert get_fb_like_locale('en-PI') == 'en_PI'
def facebook_locale(request): return {'facebook_locale': get_fb_like_locale(request.locale)}
def facebook_locale(request): return {"facebook_locale": get_fb_like_locale(request.locale)}
def test_unsupported_locale(self): """ Return the default en_US when locale isn't supported. """ assert get_fb_like_locale("zz-ZZ") == "en_US"
def facebook_locale(request): return {"facebook_locale": get_fb_like_locale(get_locale(request))}