summaryrefslogtreecommitdiff
path: root/searx/search/processors/online_dictionary.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-01-13 15:46:48 +0100
committerGitHub <noreply@github.com>2021-01-13 15:46:48 +0100
commit484dc99580a4cfdbba022209cbe896cd69b3e8b2 (patch)
tree0dc84bbe549fac71ead7ee4e4fafeb0d3f3021c2 /searx/search/processors/online_dictionary.py
parentf7e11fd7222363a72a8fa33cf69190f64a3880bd (diff)
parent912c7e975c3943db798d748fa48d460467b66d30 (diff)
Merge pull request #2419 from dalf/checker
[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