diff --git a/backend/tests/test_aio_sandbox_local_backend.py b/backend/tests/test_aio_sandbox_local_backend.py index 62aaace50..4394b776a 100644 --- a/backend/tests/test_aio_sandbox_local_backend.py +++ b/backend/tests/test_aio_sandbox_local_backend.py @@ -323,6 +323,7 @@ def test_start_container_brackets_bare_ipv6_bind_override(monkeypatch): def test_start_container_binds_dood_port_to_bridge_gateway(monkeypatch): + """Force resolver failure so host DNS cannot bypass the bridge-gateway fallback.""" backend = LocalContainerBackend( image="sandbox:latest", base_port=8080, @@ -332,6 +333,10 @@ def test_start_container_binds_dood_port_to_bridge_gateway(monkeypatch): ) monkeypatch.setenv("DEER_FLOW_SANDBOX_HOST", "host.docker.internal") monkeypatch.delenv("DEER_FLOW_SANDBOX_BIND_HOST", raising=False) + monkeypatch.setattr( + "deerflow.community.aio_sandbox.local_backend._resolve_sandbox_host_address", + lambda host: None, + ) monkeypatch.setattr( "deerflow.community.aio_sandbox.local_backend._docker_bridge_gateway_ip", lambda: "172.17.0.1",