diff options
Diffstat (limited to 'tests/unit/test_external_bangs.py')
-rw-r--r-- | tests/unit/test_external_bangs.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/unit/test_external_bangs.py b/tests/unit/test_external_bangs.py index 794edf159..ad20d52f7 100644 --- a/tests/unit/test_external_bangs.py +++ b/tests/unit/test_external_bangs.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# pylint: disable=missing-module-docstring + from searx.external_bang import ( get_node, resolve_bang_definition, @@ -31,9 +34,9 @@ TEST_DB = { } -class TestGetNode(SearxTestCase): +class TestGetNode(SearxTestCase): # pylint: disable=missing-class-docstring - DB = { + DB = { # pylint:disable=invalid-name 'trie': { 'exam': { 'ple': 'test', @@ -62,7 +65,7 @@ class TestGetNode(SearxTestCase): self.assertEqual(after, 's') -class TestResolveBangDefinition(SearxTestCase): +class TestResolveBangDefinition(SearxTestCase): # pylint:disable=missing-class-docstring def test_https(self): url, rank = resolve_bang_definition('//example.com/' + chr(2) + chr(1) + '42', 'query') self.assertEqual(url, 'https://example.com/query') @@ -74,7 +77,7 @@ class TestResolveBangDefinition(SearxTestCase): self.assertEqual(rank, 0) -class TestGetBangDefinitionAndAutocomplete(SearxTestCase): +class TestGetBangDefinitionAndAutocomplete(SearxTestCase): # pylint:disable=missing-class-docstring def test_found(self): bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('exam', external_bangs_db=TEST_DB) self.assertEqual(bang_definition, TEST_DB['trie']['exam'][LEAF_KEY]) @@ -106,7 +109,7 @@ class TestGetBangDefinitionAndAutocomplete(SearxTestCase): self.assertEqual(new_autocomplete, []) -class TestExternalBangJson(SearxTestCase): +class TestExternalBangJson(SearxTestCase): # pylint:disable=missing-class-docstring def test_no_external_bang_query(self): result = get_bang_url(SearchQuery('test', engineref_list=[EngineRef('wikipedia', 'general')])) self.assertEqual(result, None) |