summaryrefslogtreecommitdiff
path: root/tests/unit/engines/test_bing_news.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-12-12 10:06:43 +0100
committerGitHub <noreply@github.com>2016-12-12 10:06:43 +0100
commite58949b76fac7aa93341523ff0e2f35e0a03e057 (patch)
tree82f90b1e406ffda0276d2918b1b86c3589e50012 /tests/unit/engines/test_bing_news.py
parent6b6007fc78f47099d84099c6d6c23e2cd213b82f (diff)
parentb034356825420507c9fb7ee2dc100676a88cf6c7 (diff)
Merge pull request #783 from kvch/time-range-search-year
add year support to engines which support it
Diffstat (limited to 'tests/unit/engines/test_bing_news.py')
-rw-r--r--tests/unit/engines/test_bing_news.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/engines/test_bing_news.py b/tests/unit/engines/test_bing_news.py
index a909defec..b6793f7be 100644
--- a/tests/unit/engines/test_bing_news.py
+++ b/tests/unit/engines/test_bing_news.py
@@ -23,6 +23,13 @@ class TestBingNewsEngine(SearxTestCase):
params = bing_news.request(query, dicto)
self.assertIn('en', params['url'])
+ def test_no_url_in_request_year_time_range(self):
+ dicto = defaultdict(dict)
+ query = 'test_query'
+ dicto['time_range'] = 'year'
+ params = bing_news.request(query, dicto)
+ self.assertEqual({}, params['url'])
+
def test_response(self):
self.assertRaises(AttributeError, bing_news.response, None)
self.assertRaises(AttributeError, bing_news.response, [])