diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2024-03-11 14:06:26 +0100 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-03-11 14:55:38 +0100 |
| commit | 542f7d0d7bd1a12e1884ba4a1508b40e2514d472 (patch) | |
| tree | 5256282b267e494200d02914593457854567fec4 /tests/unit/test_webadapter.py | |
| parent | 8205f170ff983e5240d32dc17d7fdb526ebe5fe7 (diff) | |
[mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION
In the past, some files were tested with the standard profile, others with a
profile in which most of the messages were switched off ... some files were not
checked at all.
- ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished
- the distinction ``# lint: pylint`` is no longer necessary
- the pylint tasks have been reduced from three to two
1. ./searx/engines -> lint engines with additional builtins
2. ./searx ./searxng_extra ./tests -> lint all other python files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'tests/unit/test_webadapter.py')
| -rw-r--r-- | tests/unit/test_webadapter.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/unit/test_webadapter.py b/tests/unit/test_webadapter.py index 2aa5cba8b..493020859 100644 --- a/tests/unit/test_webadapter.py +++ b/tests/unit/test_webadapter.py @@ -1,4 +1,5 @@ -# -*- coding: utf-8 -*- +# SPDX-License-Identifier: AGPL-3.0-or-later +# pylint: disable=missing-module-docstring from searx.preferences import Preferences from searx.engines import engines @@ -24,19 +25,19 @@ TEST_ENGINES = [ SEARCHQUERY = [EngineRef(PRIVATE_ENGINE_NAME, 'general')] -class ValidateQueryCase(SearxTestCase): +class ValidateQueryCase(SearxTestCase): # pylint: disable=missing-class-docstring @classmethod def setUpClass(cls): searx.search.initialize(TEST_ENGINES) - def test_query_private_engine_without_token(self): + def test_query_private_engine_without_token(self): # pylint:disable=invalid-name preferences = Preferences(['simple'], ['general'], engines, []) valid, unknown, invalid_token = validate_engineref_list(SEARCHQUERY, preferences) self.assertEqual(len(valid), 0) self.assertEqual(len(unknown), 0) self.assertEqual(len(invalid_token), 1) - def test_query_private_engine_with_incorrect_token(self): + def test_query_private_engine_with_incorrect_token(self): # pylint:disable=invalid-name preferences_with_tokens = Preferences(['simple'], ['general'], engines, []) preferences_with_tokens.parse_dict({'tokens': 'bad-token'}) valid, unknown, invalid_token = validate_engineref_list(SEARCHQUERY, preferences_with_tokens) @@ -44,7 +45,7 @@ class ValidateQueryCase(SearxTestCase): self.assertEqual(len(unknown), 0) self.assertEqual(len(invalid_token), 1) - def test_query_private_engine_with_correct_token(self): + def test_query_private_engine_with_correct_token(self): # pylint:disable=invalid-name preferences_with_tokens = Preferences(['simple'], ['general'], engines, []) preferences_with_tokens.parse_dict({'tokens': 'my-token'}) valid, unknown, invalid_token = validate_engineref_list(SEARCHQUERY, preferences_with_tokens) |