summaryrefslogtreecommitdiff
path: root/tests/unit/test_webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_webapp.py')
-rw-r--r--tests/unit/test_webapp.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py
index 9e8bc24ce..868645e17 100644
--- a/tests/unit/test_webapp.py
+++ b/tests/unit/test_webapp.py
@@ -1,4 +1,5 @@
-# -*- coding: utf-8 -*-
+# SPDX-License-Identifier: AGPL-3.0-or-later
+# pylint: disable=missing-module-docstring
import json
from urllib.parse import ParseResult
@@ -11,15 +12,15 @@ from searx.preferences import Preferences
from tests import SearxTestCase
-class ViewsTestCase(SearxTestCase):
+class ViewsTestCase(SearxTestCase): # pylint: disable=missing-class-docstring, too-many-public-methods
def setUp(self):
# skip init function (no external HTTP request)
- def dummy(*args, **kwargs):
+ def dummy(*args, **kwargs): # pylint: disable=unused-argument
pass
self.setattr4test(searx.search.processors, 'initialize_processor', dummy)
- from searx import webapp # pylint disable=import-outside-toplevel
+ from searx import webapp # pylint: disable=import-outside-toplevel
webapp.app.config['TESTING'] = True # to get better error messages
self.app = webapp.app.test_client()
@@ -60,10 +61,10 @@ class ViewsTestCase(SearxTestCase):
Timing(engine='youtube', total=0.9, load=0.6),
]
- def search_mock(search_self, *args):
+ def search_mock(search_self, *args): # pylint: disable=unused-argument
search_self.result_container = Mock(
get_ordered_results=lambda: test_results,
- answers=dict(),
+ answers={},
corrections=set(),
suggestions=set(),
infoboxes=[],
@@ -87,7 +88,8 @@ class ViewsTestCase(SearxTestCase):
self.setattr4test(Preferences, 'get_value', preferences_get_value)
- self.maxDiff = None # to see full diffs
+ # to see full diffs
+ self.maxDiff = None # pylint: disable=invalid-name
def test_index_empty(self):
result = self.app.post('/')