mirror of
https://github.com/searx/searx
synced 2024-12-12 08:46:26 +01:00
[fix] google engine tests
This commit is contained in:
parent
8a69ade875
commit
65e6737413
@ -17,12 +17,13 @@ class TestGoogleEngine(SearxTestCase):
|
|||||||
self.assertIn('url', params)
|
self.assertIn('url', params)
|
||||||
self.assertIn(query, params['url'])
|
self.assertIn(query, params['url'])
|
||||||
self.assertIn('google.com', params['url'])
|
self.assertIn('google.com', params['url'])
|
||||||
self.assertIn('PREF', params['cookies'])
|
self.assertNotIn('PREF', params['cookies'])
|
||||||
self.assertIn('fr', params['headers']['Accept-Language'])
|
self.assertIn('fr', params['headers']['Accept-Language'])
|
||||||
|
|
||||||
dicto['language'] = 'all'
|
dicto['language'] = 'all'
|
||||||
params = google.request(query, dicto)
|
params = google.request(query, dicto)
|
||||||
self.assertIn('en', params['headers']['Accept-Language'])
|
self.assertIn('en', params['headers']['Accept-Language'])
|
||||||
|
self.assertIn('PREF', params['cookies'])
|
||||||
|
|
||||||
def test_response(self):
|
def test_response(self):
|
||||||
self.assertRaises(AttributeError, google.response, None)
|
self.assertRaises(AttributeError, google.response, None)
|
||||||
|
Loading…
Reference in New Issue
Block a user