diff options
Diffstat (limited to 'tests/unit/engines/test_google.py')
-rw-r--r-- | tests/unit/engines/test_google.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/unit/engines/test_google.py b/tests/unit/engines/test_google.py index 413b67769..5282c6713 100644 --- a/tests/unit/engines/test_google.py +++ b/tests/unit/engines/test_google.py @@ -15,7 +15,8 @@ class TestGoogleEngine(SearxTestCase): return response def test_request(self): - google.supported_languages = ['en', 'fr', 'zh-CN'] + google.supported_languages = ['en', 'fr', 'zh-CN', 'iw'] + google.language_aliases = {'he': 'iw'} query = 'test_query' dicto = defaultdict(dict) @@ -41,6 +42,12 @@ class TestGoogleEngine(SearxTestCase): self.assertIn('zh-CN', params['url']) self.assertIn('zh-CN', params['headers']['Accept-Language']) + dicto['language'] = 'he' + params = google.request(query, dicto) + self.assertIn('google.com', params['url']) + self.assertIn('iw', params['url']) + self.assertIn('iw', params['headers']['Accept-Language']) + def test_response(self): self.assertRaises(AttributeError, google.response, None) self.assertRaises(AttributeError, google.response, []) |