diff options
Diffstat (limited to 'tests/unit/network')
| -rw-r--r-- | tests/unit/network/__init__.py | 2 | ||||
| -rw-r--r-- | tests/unit/network/test_network.py | 22 |
2 files changed, 14 insertions, 10 deletions
diff --git a/tests/unit/network/__init__.py b/tests/unit/network/__init__.py index 9ed59c825..f78f6acdd 100644 --- a/tests/unit/network/__init__.py +++ b/tests/unit/network/__init__.py @@ -1,2 +1,2 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -# pylint: disable=missing-module-docstring +# pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name diff --git a/tests/unit/network/test_network.py b/tests/unit/network/test_network.py index eabb23082..46dc62ad9 100644 --- a/tests/unit/network/test_network.py +++ b/tests/unit/network/test_network.py @@ -1,17 +1,15 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -# pylint: disable=missing-module-docstring, protected-access - -from mock import patch +# pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name import httpx +from mock import patch -from searx.network.network import Network, NETWORKS, initialize +from searx.network.network import Network, NETWORKS from tests import SearxTestCase -class TestNetwork(SearxTestCase): # pylint: disable=missing-class-docstring - def setUp(self): - initialize() +class TestNetwork(SearxTestCase): + # pylint: disable=protected-access def test_simple(self): network = Network() @@ -122,10 +120,13 @@ class TestNetwork(SearxTestCase): # pylint: disable=missing-class-docstring await network.aclose() -class TestNetworkRequestRetries(SearxTestCase): # pylint: disable=missing-class-docstring +class TestNetworkRequestRetries(SearxTestCase): TEXT = 'Lorem Ipsum' + def setUp(self): + self.init_test_settings() + @classmethod def get_response_404_then_200(cls): first = True @@ -195,10 +196,13 @@ class TestNetworkRequestRetries(SearxTestCase): # pylint: disable=missing-class await network.aclose() -class TestNetworkStreamRetries(SearxTestCase): # pylint: disable=missing-class-docstring +class TestNetworkStreamRetries(SearxTestCase): TEXT = 'Lorem Ipsum' + def setUp(self): + self.init_test_settings() + @classmethod def get_response_exception_then_200(cls): first = True |