summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormisnyo <misnyo@misnyo.eu>2017-08-30 18:53:00 +0200
committerAdam Tauber <asciimoo@gmail.com>2017-08-30 21:09:03 +0200
commit0607b167f85acc6c0ab4c641f14b53cb4190e445 (patch)
tree51272ea6b3c147811d27f5aa472a7ffaaa0389ff /tests
parent489bf0f6fd1b153d20aad2ca34706cc214d91558 (diff)
downloadsearxng-0607b167f85acc6c0ab4c641f14b53cb4190e445.tar.gz
searxng-0607b167f85acc6c0ab4c641f14b53cb4190e445.zip
[fix] faroo json api and image layout fixed
Diffstat (limited to 'tests')
-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 = """
{}