summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2025-09-11 19:10:27 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-09-18 19:40:03 +0200
commit8f8343dc0d78bb57215afc3e99fd9000fce6e0cf (patch)
tree7c0aa8587ed4bc47e403b4148a308191e2d21c55 /tests
parent23257bddce864cfc44d64324dee36b32b1cf5248 (diff)
[mod] addition of various type hints / engine processors
Continuation of #5147 .. typification of the engine processors. BTW: - removed obsolete engine property https_support - fixed & improved currency_convert - engine instances can now implement a engine.setup method [#5147] https://github.com/searxng/searxng/pull/5147 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/processors/test_online.py4
-rw-r--r--tests/unit/test_webapp.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/processors/test_online.py b/tests/unit/processors/test_online.py
index 0a73fd4cc..b8758083b 100644
--- a/tests/unit/processors/test_online.py
+++ b/tests/unit/processors/test_online.py
@@ -20,7 +20,7 @@ class TestOnlineProcessor(SearxTestCase):
def test_get_params_default_params(self):
engine = engines.engines[TEST_ENGINE_NAME]
- online_processor = online.OnlineProcessor(engine, TEST_ENGINE_NAME)
+ online_processor = online.OnlineProcessor(engine)
search_query = SearchQuery('test', [EngineRef(TEST_ENGINE_NAME, 'general')], 'all', 0, 1, None, None, None)
params = self._get_params(online_processor, search_query, 'general')
self.assertIn('method', params)
@@ -32,7 +32,7 @@ class TestOnlineProcessor(SearxTestCase):
def test_get_params_useragent(self):
engine = engines.engines[TEST_ENGINE_NAME]
- online_processor = online.OnlineProcessor(engine, TEST_ENGINE_NAME)
+ online_processor = online.OnlineProcessor(engine)
search_query = SearchQuery('test', [EngineRef(TEST_ENGINE_NAME, 'general')], 'all', 0, 1, None, None, None)
params = self._get_params(online_processor, search_query, 'general')
self.assertIn('User-Agent', params['headers'])
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py
index 91c6309fc..e66f46a9c 100644
--- a/tests/unit/test_webapp.py
+++ b/tests/unit/test_webapp.py
@@ -24,7 +24,7 @@ class ViewsTestCase(SearxTestCase): # pylint: disable=too-many-public-methods
def dummy(*args, **kwargs): # pylint: disable=unused-argument
pass
- self.setattr4test(searx.search.processors, 'initialize_processor', dummy)
+ self.setattr4test(searx.search.processors.PROCESSORS, 'init', dummy)
# set some defaults
test_results = [