Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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