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