Exemplo n.º 1
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
Exemplo n.º 2
0
def test_switching_language_sets_current_language(language):
    change_language_to(language)
    assert current_language() == language
Exemplo n.º 3
0
def test_current_language_is_default_language():
    assert current_language() == DEFAULT_LANGUAGE
Exemplo n.º 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
Exemplo n.º 5
0
def test_current_language_is_default_language():
    assert current_language() == DEFAULT_LANGUAGE
Exemplo n.º 6
0
def test_switching_language_sets_current_language(language):
    change_language_to(language)
    assert current_language() == language
Exemplo n.º 7
0
 def translate_ro():
     print(current_language())
     change_language_to("ro")
Exemplo n.º 8
0
 def translate():
     print(current_language())
     change_language_to("en")