summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-05-07 10:57:55 +0200
committerAlexandre Flament <alex@al-f.net>2021-05-07 10:57:55 +0200
commit605124679d9652119ed92ed0b9b082c52adcc569 (patch)
tree9ea55d34e06efaf4e14c8ad200e5bcb0de9ac882 /tests
parentf92a8e432ab3cf99b9b02c33c38ccbd1869a0bbe (diff)
[fix] fix KeyError: 'ipv6'
tests/units/network/test_network.py requires a call to searx.network.network.initialize Depending of the test order execution, this function was sometimes call in another test, sometimes not. This commit ensure there is a call to initialize()
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/network/test_network.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/network/test_network.py b/tests/unit/network/test_network.py
index 246dfd85..e8d33240 100644
--- a/tests/unit/network/test_network.py
+++ b/tests/unit/network/test_network.py
@@ -4,12 +4,15 @@ from mock import patch
import httpx
-from searx.network.network import Network, NETWORKS
+from searx.network.network import Network, NETWORKS, initialize
from searx.testing import SearxTestCase
class TestNetwork(SearxTestCase):
+ def setUp(self):
+ initialize()
+
def test_simple(self):
network = Network()