summaryrefslogtreecommitdiff
path: root/tests/unit/test_preferences.py
diff options
context:
space:
mode:
authormarc <a01200356@itesm.mx>2017-07-20 15:47:20 -0500
committerMarc Abonce Seguin <marc-abonce@mailbox.org>2017-12-06 01:20:15 -0600
commit4d1770398a6af8902e75c0bd885781584d39e796 (patch)
tree1ad30e59206eca081c93a2ad37928ce059f7d114 /tests/unit/test_preferences.py
parent46fb0d860e35a45658969c4e2ac306a1072bc331 (diff)
downloadsearxng-4d1770398a6af8902e75c0bd885781584d39e796.tar.gz
searxng-4d1770398a6af8902e75c0bd885781584d39e796.zip
remove 'all' option from search languages
Diffstat (limited to 'tests/unit/test_preferences.py')
-rw-r--r--tests/unit/test_preferences.py15
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)