summaryrefslogtreecommitdiff
path: root/searx/search/processors/online_dictionary.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/online_dictionary.py
parentf7e11fd7222363a72a8fa33cf69190f64a3880bd (diff)
[enh] add checker
Diffstat (limited to 'searx/search/processors/online_dictionary.py')
-rw-r--r--searx/search/processors/online_dictionary.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/searx/search/processors/online_dictionary.py b/searx/search/processors/online_dictionary.py
index 8e9ef1620..987c710a1 100644
--- a/searx/search/processors/online_dictionary.py
+++ b/searx/search/processors/online_dictionary.py
@@ -35,3 +35,21 @@ class OnlineDictionaryProcessor(OnlineProcessor):
params['query'] = query
return params
+
+ def get_default_tests(self):
+ tests = {}
+
+ if getattr(self.engine, 'paging', False):
+ tests['translation_paging'] = {
+ 'matrix': {'query': 'en-es house',
+ 'pageno': (1, 2, 3)},
+ 'result_container': ['not_empty', ('one_title_contains', 'house')],
+ 'test': ['unique_results']
+ }
+ else:
+ tests['translation'] = {
+ 'matrix': {'query': 'en-es house'},
+ 'result_container': ['not_empty', ('one_title_contains', 'house')],
+ }
+
+ return tests