diff --git a/searx/tests/engines/test_swisscows.py b/searx/tests/engines/test_swisscows.py index 926ba885e..3b4ce7b0f 100644 --- a/searx/tests/engines/test_swisscows.py +++ b/searx/tests/engines/test_swisscows.py @@ -23,6 +23,10 @@ class TestSwisscowsEngine(SearxTestCase): self.assertTrue('uiLanguage=browser' in params['url']) self.assertTrue('region=browser' in params['url']) + dicto['category'] = 'images' + params = swisscows.request(query, dicto) + self.assertIn('image', params['url']) + def test_response(self): self.assertRaises(AttributeError, swisscows.response, None) self.assertRaises(AttributeError, swisscows.response, []) diff --git a/searx/tests/engines/test_yahoo_news.py b/searx/tests/engines/test_yahoo_news.py index 94d819d61..4d7fc0a10 100644 --- a/searx/tests/engines/test_yahoo_news.py +++ b/searx/tests/engines/test_yahoo_news.py @@ -29,6 +29,13 @@ class TestYahooNewsEngine(SearxTestCase): self.assertIn('en', params['cookies']['sB']) self.assertIn('en', params['url']) + def test_sanitize_url(self): + url = "test.url" + self.assertEqual(url, yahoo_news.sanitize_url(url)) + + url = "www.yahoo.com/;_ylt=test" + self.assertEqual("www.yahoo.com/", yahoo_news.sanitize_url(url)) + def test_response(self): self.assertRaises(AttributeError, yahoo_news.response, None) self.assertRaises(AttributeError, yahoo_news.response, []) @@ -57,7 +64,17 @@ class TestYahooNewsEngine(SearxTestCase): This is the content - +