summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorMarc Abonce Seguin <marc-abonce@mailbox.org>2018-04-18 22:55:37 -0500
committerMarc Abonce Seguin <marc-abonce@mailbox.org>2018-04-18 23:29:48 -0500
commitf7f9c50393785c8d6ad6c40a4c507b292ea438b1 (patch)
tree8a2e45d4ac35f898a4ba2f6661fc7a99771c7514 /tests/unit
parent49b6206d6cbfdc19e2bb2c42e999fd7caa776a09 (diff)
downloadsearxng-f7f9c50393785c8d6ad6c40a4c507b292ea438b1.tar.gz
searxng-f7f9c50393785c8d6ad6c40a4c507b292ea438b1.zip
[fix] force English results in Google when using en-US
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/engines/test_google.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/engines/test_google.py b/tests/unit/engines/test_google.py
index 33556cc7a..413b67769 100644
--- a/tests/unit/engines/test_google.py
+++ b/tests/unit/engines/test_google.py
@@ -26,16 +26,19 @@ class TestGoogleEngine(SearxTestCase):
self.assertIn('url', params)
self.assertIn(query, params['url'])
self.assertIn('google.fr', params['url'])
+ self.assertIn('fr', params['url'])
self.assertIn('fr', params['headers']['Accept-Language'])
dicto['language'] = 'en-US'
params = google.request(query, dicto)
- self.assertIn('google.co', params['url'])
+ self.assertIn('google.com', params['url'])
+ self.assertIn('en', params['url'])
self.assertIn('en', params['headers']['Accept-Language'])
dicto['language'] = 'zh'
params = google.request(query, dicto)
self.assertIn('google.com', params['url'])
+ self.assertIn('zh-CN', params['url'])
self.assertIn('zh-CN', params['headers']['Accept-Language'])
def test_response(self):