diff options
Diffstat (limited to 'tests/unit/test_webapp.py')
-rw-r--r-- | tests/unit/test_webapp.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py index fae1755d6..dcf8b583c 100644 --- a/tests/unit/test_webapp.py +++ b/tests/unit/test_webapp.py @@ -33,6 +33,19 @@ class ViewsTestCase(SearxTestCase): }, ] + timings = [ + { + 'engine': 'startpage', + 'total': 0.8, + 'load': 0.7 + }, + { + 'engine': 'youtube', + 'total': 0.9, + 'load': 0.6 + } + ] + def search_mock(search_self, *args): search_self.result_container = Mock(get_ordered_results=lambda: self.test_results, answers=set(), @@ -42,7 +55,8 @@ class ViewsTestCase(SearxTestCase): unresponsive_engines=set(), results=self.test_results, results_number=lambda: 3, - results_length=lambda: len(self.test_results)) + results_length=lambda: len(self.test_results), + get_timings=lambda: timings) Search.search = search_mock |