summaryrefslogtreecommitdiff
path: root/tests/unit/engines/test_faroo.py
diff options
context:
space:
mode:
authorApply55gx <Apply55gx@users.noreply.github.com>2017-10-25 10:44:28 +0200
committerGitHub <noreply@github.com>2017-10-25 10:44:28 +0200
commitd800e3fcfa44bc0be7262092815b2d2020a9d9f3 (patch)
tree0bdc64b3e15592e2fdeeaa40f21cbcc8039b7949 /tests/unit/engines/test_faroo.py
parent18a4e7035f72a3c31239ae0bd1ee67cc2ad354b8 (diff)
parentb34124fd8a6b020136ca9656acdb01afceabe96f (diff)
Merge pull request #1 from asciimoo/master
-
Diffstat (limited to 'tests/unit/engines/test_faroo.py')
-rw-r--r--tests/unit/engines/test_faroo.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/unit/engines/test_faroo.py b/tests/unit/engines/test_faroo.py
index acebdda86..ebcde39a7 100644
--- a/tests/unit/engines/test_faroo.py
+++ b/tests/unit/engines/test_faroo.py
@@ -40,9 +40,6 @@ class TestFarooEngine(SearxTestCase):
response = mock.Mock(text='{"data": []}')
self.assertEqual(faroo.response(response), [])
- response = mock.Mock(text='{"data": []}', status_code=401)
- self.assertRaises(Exception, faroo.response, response)
-
response = mock.Mock(text='{"data": []}', status_code=429)
self.assertRaises(Exception, faroo.response, response)
@@ -98,14 +95,14 @@ class TestFarooEngine(SearxTestCase):
response = mock.Mock(text=json)
results = faroo.response(response)
self.assertEqual(type(results), list)
- self.assertEqual(len(results), 4)
+ self.assertEqual(len(results), 3)
self.assertEqual(results[0]['title'], 'This is the title')
self.assertEqual(results[0]['url'], 'http://this.is.the.url/')
self.assertEqual(results[0]['content'], 'This is the content')
self.assertEqual(results[1]['title'], 'This is the title2')
self.assertEqual(results[1]['url'], 'http://this.is.the.url2/')
self.assertEqual(results[1]['content'], 'This is the content2')
- self.assertEqual(results[3]['img_src'], 'http://upload.wikimedia.org/optimized.jpg')
+ self.assertEqual(results[2]['thumbnail'], 'http://upload.wikimedia.org/optimized.jpg')
json = """
{}