diff options
| author | Alexandre Flament <alex@al-f.net> | 2020-12-24 09:28:16 +0100 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2021-01-12 11:47:17 +0100 |
| commit | 8cbc9f2d5823eb984e99e15c963e306610007fa1 (patch) | |
| tree | 4dea97c668d960926938aefc8f0f77456bee47d6 /searx/search/processors/online_dictionary.py | |
| parent | f7e11fd7222363a72a8fa33cf69190f64a3880bd (diff) | |
[enh] add checker
Diffstat (limited to 'searx/search/processors/online_dictionary.py')
| -rw-r--r-- | searx/search/processors/online_dictionary.py | 18 |
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 |