summaryrefslogtreecommitdiff
path: root/searx/tests/engines/test_google_images.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/tests/engines/test_google_images.py')
-rw-r--r--searx/tests/engines/test_google_images.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/searx/tests/engines/test_google_images.py b/searx/tests/engines/test_google_images.py
index 6870ff52f..32d133334 100644
--- a/searx/tests/engines/test_google_images.py
+++ b/searx/tests/engines/test_google_images.py
@@ -11,9 +11,14 @@ class TestGoogleImagesEngine(SearxTestCase):
dicto = defaultdict(dict)
dicto['pageno'] = 1
params = google_images.request(query, dicto)
- self.assertTrue('url' in params)
- self.assertTrue(query in params['url'])
- self.assertTrue('googleapis.com' in params['url'])
+ self.assertIn('url', params)
+ self.assertIn(query, params['url'])
+ self.assertIn('googleapis.com', params['url'])
+ self.assertIn('safe=on', params['url'])
+
+ dicto['safesearch'] = 0
+ params = google_images.request(query, dicto)
+ self.assertIn('safe=off', params['url'])
def test_response(self):
self.assertRaises(AttributeError, google_images.response, None)