summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2017-02-12 14:58:49 +0100
committerAdam Tauber <asciimoo@gmail.com>2017-05-15 17:28:21 +0200
commitf5128c7cb96d7564cc7bebeae13a319557b84aaa (patch)
tree8cdb0bfaacaf00cd193e6a5afffef2464a7152ec /tests
parent4cffd78650c3f1dfce413ae0a1cd0453ebe6f277 (diff)
downloadsearxng-f5128c7cb96d7564cc7bebeae13a319557b84aaa.tar.gz
searxng-f5128c7cb96d7564cc7bebeae13a319557b84aaa.zip
[mod] add/modify image fetching for bing_news, qwant and twitter engines
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/engines/test_bing_news.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/engines/test_bing_news.py b/tests/unit/engines/test_bing_news.py
index e571adcee..28ec7a3ed 100644
--- a/tests/unit/engines/test_bing_news.py
+++ b/tests/unit/engines/test_bing_news.py
@@ -81,11 +81,11 @@ class TestBingNewsEngine(SearxTestCase):
self.assertEqual(results[0]['title'], 'Title')
self.assertEqual(results[0]['url'], 'http://url.of.article/')
self.assertEqual(results[0]['content'], 'Article Content')
- self.assertEqual(results[0]['thumbnail'], 'https://www.bing.com/th?id=ON.13371337133713371337133713371337')
+ self.assertEqual(results[0]['img_src'], 'https://www.bing.com/th?id=ON.13371337133713371337133713371337')
self.assertEqual(results[1]['title'], 'Another Title')
self.assertEqual(results[1]['url'], 'http://another.url.of.article/')
self.assertEqual(results[1]['content'], 'Another Article Content')
- self.assertNotIn('thumbnail', results[1])
+ self.assertNotIn('img_src', results[1])
html = """<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:News="https://www.bing.com:443/news/search?q=python&amp;setmkt=en-US&amp;first=1&amp;format=RSS">
@@ -120,7 +120,7 @@ class TestBingNewsEngine(SearxTestCase):
self.assertEqual(results[0]['title'], 'Title')
self.assertEqual(results[0]['url'], 'http://another.url.of.article/')
self.assertEqual(results[0]['content'], 'Article Content')
- self.assertEqual(results[0]['thumbnail'], 'http://another.bing.com/image')
+ self.assertEqual(results[0]['img_src'], 'http://another.bing.com/image')
html = """<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:News="https://www.bing.com:443/news/search?q=python&amp;setmkt=en-US&amp;first=1&amp;format=RSS">