diff options
author | Marc Abonce Seguin <marc-abonce@mailbox.org> | 2018-04-18 22:55:37 -0500 |
---|---|---|
committer | Marc Abonce Seguin <marc-abonce@mailbox.org> | 2018-04-18 23:29:48 -0500 |
commit | f7f9c50393785c8d6ad6c40a4c507b292ea438b1 (patch) | |
tree | 8a2e45d4ac35f898a4ba2f6661fc7a99771c7514 /tests/unit | |
parent | 49b6206d6cbfdc19e2bb2c42e999fd7caa776a09 (diff) | |
download | searxng-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.py | 5 |
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): |