diff options
Diffstat (limited to 'tests/unit/test_preferences.py')
-rw-r--r-- | tests/unit/test_preferences.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/unit/test_preferences.py b/tests/unit/test_preferences.py index 885c515e2..c8f2a4419 100644 --- a/tests/unit/test_preferences.py +++ b/tests/unit/test_preferences.py @@ -90,25 +90,30 @@ class TestSettings(SearxTestCase): # search language settings def test_lang_setting_valid_choice(self): - setting = SearchLanguageSetting('all', choices=['all', 'de', 'en']) + setting = SearchLanguageSetting('en', choices=['de', 'en']) setting.parse('de') self.assertEquals(setting.get_value(), 'de') def test_lang_setting_invalid_choice(self): - setting = SearchLanguageSetting('all', choices=['all', 'de', 'en']) + setting = SearchLanguageSetting('en', choices=['de', 'en']) setting.parse('xx') - self.assertEquals(setting.get_value(), 'all') + self.assertEquals(setting.get_value(), 'en') def test_lang_setting_old_cookie_choice(self): - setting = SearchLanguageSetting('all', choices=['all', 'es', 'es-ES']) + setting = SearchLanguageSetting('en', choices=['en', 'es', 'es-ES']) setting.parse('es_XA') self.assertEquals(setting.get_value(), 'es') def test_lang_setting_old_cookie_format(self): - setting = SearchLanguageSetting('all', choices=['all', 'es', 'es-ES']) + setting = SearchLanguageSetting('en', choices=['en', 'es', 'es-ES']) setting.parse('es_ES') self.assertEquals(setting.get_value(), 'es-ES') + def test_lang_setting_old_default(self): + setting = SearchLanguageSetting('en', choices=['en', 'es', 'de']) + setting.parse('all') + self.assertEquals(setting.get_value(), 'en') + # plugins settings def test_plugins_setting_all_default_enabled(self): plugin1 = PluginStub('plugin1', True) |