mirror of
https://github.com/searxng/searxng.git
synced 2025-07-30 16:42:22 +02:00
[enh][mod] search refactor
This commit is contained in:
parent
a07b2b514c
commit
b0ba367a1a
4 changed files with 170 additions and 174 deletions
|
@ -39,7 +39,7 @@ class ViewsTestCase(SearxTestCase):
|
|||
self.assertEqual(result.status_code, 200)
|
||||
self.assertIn('<div class="title"><h1>searx</h1></div>', result.data)
|
||||
|
||||
@patch('searx.webapp.do_search')
|
||||
@patch('searx.search.Search.search')
|
||||
def test_index_html(self, search):
|
||||
search.return_value = (
|
||||
self.test_results,
|
||||
|
@ -55,7 +55,7 @@ class ViewsTestCase(SearxTestCase):
|
|||
result.data
|
||||
)
|
||||
|
||||
@patch('searx.webapp.do_search')
|
||||
@patch('searx.search.Search.search')
|
||||
def test_index_json(self, search):
|
||||
search.return_value = (
|
||||
self.test_results,
|
||||
|
@ -71,7 +71,7 @@ class ViewsTestCase(SearxTestCase):
|
|||
self.assertEqual(
|
||||
result_dict['results'][0]['url'], 'http://first.test.xyz')
|
||||
|
||||
@patch('searx.webapp.do_search')
|
||||
@patch('searx.search.Search.search')
|
||||
def test_index_csv(self, search):
|
||||
search.return_value = (
|
||||
self.test_results,
|
||||
|
@ -86,7 +86,7 @@ class ViewsTestCase(SearxTestCase):
|
|||
result.data
|
||||
)
|
||||
|
||||
@patch('searx.webapp.do_search')
|
||||
@patch('searx.search.Search.search')
|
||||
def test_index_rss(self, search):
|
||||
search.return_value = (
|
||||
self.test_results,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue