summaryrefslogtreecommitdiff
path: root/tests/unit/engines/test_duckduckgo.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/engines/test_duckduckgo.py')
-rw-r--r--tests/unit/engines/test_duckduckgo.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/engines/test_duckduckgo.py b/tests/unit/engines/test_duckduckgo.py
index cb866d396..734f2c39e 100644
--- a/tests/unit/engines/test_duckduckgo.py
+++ b/tests/unit/engines/test_duckduckgo.py
@@ -19,6 +19,13 @@ class TestDuckduckgoEngine(SearxTestCase):
self.assertIn('duckduckgo.com', params['url'])
self.assertIn('ch-de', params['url'])
+ def test_no_url_in_request_year_time_range(self):
+ dicto = defaultdict(dict)
+ query = 'test_query'
+ dicto['time_range'] = 'year'
+ params = duckduckgo.request(query, dicto)
+ self.assertEqual({}, params['url'])
+
def test_response(self):
self.assertRaises(AttributeError, duckduckgo.response, None)
self.assertRaises(AttributeError, duckduckgo.response, [])