summaryrefslogtreecommitdiff
path: root/searx/search/processors/abstract.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-12-24 09:28:16 +0100
committerAlexandre Flament <alex@al-f.net>2021-01-12 11:47:17 +0100
commit8cbc9f2d5823eb984e99e15c963e306610007fa1 (patch)
tree4dea97c668d960926938aefc8f0f77456bee47d6 /searx/search/processors/abstract.py
parentf7e11fd7222363a72a8fa33cf69190f64a3880bd (diff)
downloadsearxng-8cbc9f2d5823eb984e99e15c963e306610007fa1.tar.gz
searxng-8cbc9f2d5823eb984e99e15c963e306610007fa1.zip
[enh] add checker
Diffstat (limited to 'searx/search/processors/abstract.py')
-rw-r--r--searx/search/processors/abstract.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/searx/search/processors/abstract.py b/searx/search/processors/abstract.py
index cf3fd7236..eb8d296ec 100644
--- a/searx/search/processors/abstract.py
+++ b/searx/search/processors/abstract.py
@@ -37,3 +37,15 @@ class EngineProcessor:
@abstractmethod
def search(self, query, params, result_container, start_time, timeout_limit):
pass
+
+ def get_tests(self):
+ tests = getattr(self.engine, 'tests', None)
+ if tests is None:
+ tests = getattr(self.engine, 'additional_tests', {})
+ tests.update(self.get_default_tests())
+ return tests
+ else:
+ return tests
+
+ def get_default_tests(self):
+ return {}