diff options
| author | Adam Tauber <adam.tauber@balabit.com> | 2015-10-16 12:27:15 +0200 |
|---|---|---|
| committer | Adam Tauber <adam.tauber@balabit.com> | 2015-10-16 12:27:15 +0200 |
| commit | d8ef98371bd599be28307778d85dcee549d99f74 (patch) | |
| tree | f2a9f40f19e5520e1b60e4b930b961de1c71db6a /searx/tests/test_webapp.py | |
| parent | f1ac794a0737c76516cf6c324027f2dd718a67a1 (diff) | |
| parent | 66a70c6ae4ebddc5b1d9b4e4414d66239781617c (diff) | |
Merge remote-tracking branch 'remotes/origin/result-handling-refactor'
Diffstat (limited to 'searx/tests/test_webapp.py')
| -rw-r--r-- | searx/tests/test_webapp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py index 471ec2f2d..1d9cc649c 100644 --- a/searx/tests/test_webapp.py +++ b/searx/tests/test_webapp.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import json +from mock import Mock from urlparse import ParseResult from searx import webapp from searx.testing import SearxTestCase @@ -33,7 +34,12 @@ class ViewsTestCase(SearxTestCase): ] def search_mock(search_self, *args): - search_self.results = self.test_results + search_self.result_container = Mock(get_ordered_results=lambda: self.test_results, + answers=set(), + suggestions=set(), + infoboxes=[], + results=self.test_results, + results_length=lambda: len(self.test_results)) webapp.Search.search = search_mock |