浏览代码

[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()
pull/2807/head
Alexandre Flament 3 个月前
提交者 Noémi Ványi
父节点
当前提交
4a187d41be
  1. 5
      tests/unit/network/test_network.py

5
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()

正在加载...
取消
保存