from collections import defaultdict import mock from searx.engines import acgsou from searx.testing import SearxTestCase class TestAcgsouEngine(SearxTestCase): def test_request(self): query = 'test_query' dic = defaultdict(dict) dic['pageno'] = 1 params = acgsou.request(query, dic) self.assertTrue('url' in params) self.assertTrue(query in params['url']) self.assertTrue('acgsou.com' in params['url']) def test_response(self): resp = mock.Mock(text='') self.assertEqual(acgsou.response(resp), []) html = """
test | test | test | test | test | test | test | test |
---|---|---|---|---|---|---|---|
date | testcategory | torrentname | 1MB | 29 | 211 | 168 | user |