summaryrefslogtreecommitdiff
path: root/tests/unit/engines/test_duckduckgo.py
diff options
context:
space:
mode:
authora01200356 <a01200356@itesm.mx>2016-06-03 00:14:23 -0500
committermarc <a01200356@itesm.mx>2016-07-12 23:44:39 -0500
commit8fc4b8156affc9e7f00db0988ccd627b3eaae8a7 (patch)
treed85901fdd96e2968f7a21800fde891c0dcd181b3 /tests/unit/engines/test_duckduckgo.py
parent3fd405dcd3fd46d5b6f2fe1df625eedf0f1fbe02 (diff)
downloadsearxng-8fc4b8156affc9e7f00db0988ccd627b3eaae8a7.tar.gz
searxng-8fc4b8156affc9e7f00db0988ccd627b3eaae8a7.zip
[fix] multilingual duckduckgo
only works if both country and language are set
Diffstat (limited to 'tests/unit/engines/test_duckduckgo.py')
-rw-r--r--tests/unit/engines/test_duckduckgo.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/unit/engines/test_duckduckgo.py b/tests/unit/engines/test_duckduckgo.py
index 8f99dc9cb..90cdc9d9e 100644
--- a/tests/unit/engines/test_duckduckgo.py
+++ b/tests/unit/engines/test_duckduckgo.py
@@ -11,16 +11,12 @@ class TestDuckduckgoEngine(SearxTestCase):
query = 'test_query'
dicto = defaultdict(dict)
dicto['pageno'] = 1
- dicto['language'] = 'fr_FR'
+ dicto['language'] = 'de_CH'
params = duckduckgo.request(query, dicto)
self.assertIn('url', params)
self.assertIn(query, params['url'])
self.assertIn('duckduckgo.com', params['url'])
- self.assertIn('fr-fr', params['url'])
-
- dicto['language'] = 'all'
- params = duckduckgo.request(query, dicto)
- self.assertIn('en-us', params['url'])
+ self.assertIn('ch-de', params['url'])
def test_response(self):
self.assertRaises(AttributeError, duckduckgo.response, None)