diff options
| author | Kang-min Liu <gugod@gugod.org> | 2015-11-14 00:05:44 +0100 |
|---|---|---|
| committer | Kang-min Liu <gugod@gugod.org> | 2015-11-14 00:05:44 +0100 |
| commit | ac8759cd3ff99024864fd04d7c4bef5c3a00b971 (patch) | |
| tree | 30c3f8b61504532df926bbffedcc8df80a8e926e /searx/tests/test_webapp.py | |
| parent | c7c6c35ccd7373d2107b70b92badb9b70d31905f (diff) | |
| parent | e98aef6fc4954681e58d774203d522f0ae478004 (diff) | |
Merge remote-tracking branch 'origin/master'
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 |