def test_can_set_translated_language(code):
    translated = language_code_to_translation(code)
    change_language_to_translated(translated)
    assert current_language() == code
    assert current_translated_language() == translated
def test_switching_language_sets_current_language(language):
    change_language_to(language)
    assert current_language() == language
def test_current_language_is_default_language():
    assert current_language() == DEFAULT_LANGUAGE
Beispiel #4
0
def test_can_set_translated_language(code):
    translated = language_code_to_translation(code)
    change_language_to_translated(translated)
    assert current_language() == code
    assert current_translated_language() == translated
Beispiel #5
0
def test_current_language_is_default_language():
    assert current_language() == DEFAULT_LANGUAGE
Beispiel #6
0
def test_switching_language_sets_current_language(language):
    change_language_to(language)
    assert current_language() == language
Beispiel #7
0
 def translate_ro():
     print(current_language())
     change_language_to("ro")
Beispiel #8
0
 def translate():
     print(current_language())
     change_language_to("en")