on master help sign in
[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()

commit4a187d41be33636d92552c68a591ee6d57257737 authorAlexandre Flament <alex@al-f.net> dateFri 7 May 2021, 10:57 (5 years ago) parent5e53e94
1 file changed+4−1
tests/unit/network/test_network.py+4−1
tests/unit/network/test_network.py+4−1
@@ -4,12 +4,15 @@ from mock import patch
44
55import httpx
66
7−from searx.network.network import Network, NETWORKS
7+from searx.network.network import Network, NETWORKS, initialize
88from searx.testing import SearxTestCase
99
1010
1111class TestNetwork(SearxTestCase):
1212
13+ def setUp(self):
14+ initialize()
15+
1316 def test_simple(self):
1417 network = Network()
1518