summaryrefslogtreecommitdiff
path: root/tests/unit/engines/test_google_images.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2019-12-24 17:45:13 +0100
committerGitHub <noreply@github.com>2019-12-24 17:45:13 +0100
commitecb054a7a058a1f62a536e5cac88eed8926b107d (patch)
tree925594876f18580732d2c8a438ff8f3bea8d9092 /tests/unit/engines/test_google_images.py
parentcc8d4b958e274eb9e154db5c319d2e50da561d61 (diff)
parent5a0a66e9bc34af2b6404231efc7cf02f389bdfcb (diff)
downloadsearxng-ecb054a7a058a1f62a536e5cac88eed8926b107d.tar.gz
searxng-ecb054a7a058a1f62a536e5cac88eed8926b107d.zip
Merge branch 'master' into patch-1
Diffstat (limited to 'tests/unit/engines/test_google_images.py')
-rw-r--r--tests/unit/engines/test_google_images.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/unit/engines/test_google_images.py b/tests/unit/engines/test_google_images.py
deleted file mode 100644
index 8366e1b08..000000000
--- a/tests/unit/engines/test_google_images.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from collections import defaultdict
-import mock
-from searx.engines import google_images
-from searx.testing import SearxTestCase
-
-
-class TestGoogleImagesEngine(SearxTestCase):
-
- def test_request(self):
- query = 'test_query'
- dicto = defaultdict(dict)
- dicto['pageno'] = 1
- dicto['safesearch'] = 1
- dicto['time_range'] = ''
- params = google_images.request(query, dicto)
- self.assertIn('url', params)
- self.assertIn(query, params['url'])
-
- dicto['safesearch'] = 0
- params = google_images.request(query, dicto)
- self.assertNotIn('safe', params['url'])
-
- def test_response(self):
- self.assertRaises(AttributeError, google_images.response, None)
- self.assertRaises(AttributeError, google_images.response, [])
- self.assertRaises(AttributeError, google_images.response, '')
- self.assertRaises(AttributeError, google_images.response, '[]')