Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] search mocking in webapp test

Adam Tauber044809e29801
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py
index 912bebc4d..1ef1f56c3 100644
--- a/tests/unit/test_webapp.py
+++ b/tests/unit/test_webapp.py
@@ -5,6 +5,7 @@ from mock import Mock
from urlparse import ParseResult
from searx import webapp
from searx.testing import SearxTestCase
+from searx.search import Search
class ViewsTestCase(SearxTestCase):
@@ -41,7 +42,7 @@ class ViewsTestCase(SearxTestCase):
results_number=lambda: 3,
results_length=lambda: len(self.test_results))
- webapp.Search.search = search_mock
+ Search.search = search_mock
def get_current_theme_name_mock(override=None):
return 'legacy'