Ejemplo n.º 1
0
def test_get_text_with_locale(test):
    res = test
    res.language = "fr"
    sounds.load_default(res)
    assert sounds.get_text("0") == "oui"
    assert sounds.get_text("1") == "no"
    assert sounds.get_text("2") is None
Ejemplo n.º 2
0
def test_get_sound_with_default_config(default):
    # this test is a bit long (it loads all the default sounds)
    res = default
    res.language = "fr"
    sounds.load_default(res)
    assert sounds.get_sound("9999") is not None
    assert sounds.get_sound("fdsgedtgf") is None
Ejemplo n.º 3
0
def test_get_text(test):
    res = test
    res.language = "en"
    sounds.load_default(res)
    assert sounds.get_text("0") == "yes"
    assert sounds.get_text("1") == "no"
    assert sounds.get_text("2") is None
Ejemplo n.º 4
0
def test_get_text_with_locale(test):
    res = test
    res.language = "fr"
    sounds.load_default(res)
    assert sounds.get_text("0") == "oui"
    assert sounds.get_text("1") == "no"
    assert sounds.get_text("2") is None
Ejemplo n.º 5
0
def test_get_text(test):
    res = test
    res.language = "en"
    sounds.load_default(res)
    assert sounds.get_text("0") == "yes"
    assert sounds.get_text("1") == "no"
    assert sounds.get_text("2") is None
Ejemplo n.º 6
0
def test_get_sound_with_default_config(default):
    # this test is a bit long (it loads all the default sounds)
    res = default
    res.language = "fr"
    sounds.load_default(res)
    assert sounds.get_sound("9999") is not None
    assert sounds.get_sound("fdsgedtgf") is None
Ejemplo n.º 7
0
def test_get_sound(test):
    res = test
    res.language = "en"
    sounds.load_default(res)
    assert sounds.get_sound("1000") is None
    assert sounds.get_sound("fdsgedtgf") is None
    assert sounds.get_sound("9998") is not None
    assert sounds.get_sound("9999") is None
    assert sounds.get_sound("1028") is None
Ejemplo n.º 8
0
def test_get_sound(test):
    res = test
    res.language = "en"
    sounds.load_default(res)
    assert sounds.get_sound("1000") is None
    assert sounds.get_sound("fdsgedtgf") is None
    assert sounds.get_sound("9998") is not None
    assert sounds.get_sound("9999") is None
    assert sounds.get_sound("1028") is None
Ejemplo n.º 9
0
def test_get_sound_with_locale(test):
    res = test
    res.language = "fr"
    sounds.load_default(res)
    assert sounds.get_sound("1000") is None
    assert sounds.get_sound("fdsgedtgf") is None
    assert sounds.get_sound("9998") is not None
    assert sounds.get_sound("9999") is not None
    # a sound can be stored in a sub directory
    assert sounds.get_sound("1028") is not None
Ejemplo n.º 10
0
def test_get_sound_with_locale(test):
    res = test
    res.language = "fr"
    sounds.load_default(res)
    assert sounds.get_sound("1000") is None
    assert sounds.get_sound("fdsgedtgf") is None
    assert sounds.get_sound("9998") is not None
    assert sounds.get_sound("9999") is not None
    # a sound can be stored in a sub directory
    assert sounds.get_sound("1028") is not None