diff --git a/tests/test_tool_policy.py b/tests/test_tool_policy.py index 2da581c4e..fd4fb1f23 100644 --- a/tests/test_tool_policy.py +++ b/tests/test_tool_policy.py @@ -48,7 +48,7 @@ def _patch_loop_basics(monkeypatch): monkeypatch.setattr(al, "get_setting", lambda key, default=None: default, raising=False) monkeypatch.setattr(al, "get_mcp_manager", lambda: None, raising=False) monkeypatch.setattr(al, "estimate_tokens", lambda *a, **k: 10, raising=False) - monkeypatch.setattr(al, "_configured_model_tool_surface_raw", lambda *a, **k: "", raising=False) + monkeypatch.setattr("src.tool_capabilities.TOOL_APPROVAL_GATE_ENABLED", False) def test_detects_strong_guide_only_turns(): @@ -1067,8 +1067,6 @@ def test_agent_loop_policy_blocks_disabled_web_tool_call_before_execution(monkey def test_web_fetch_js_failure_exposes_private_browser_next_round(monkeypatch): _patch_loop_basics(monkeypatch) - monkeypatch.setattr(al, "_looks_like_contextual_public_web_followup", lambda *a, **k: False, raising=False) - monkeypatch.setattr(al, "_contextual_public_web_topic_text", lambda *a, **k: "", raising=False) sent_tools = [] sent_messages = [] @@ -1108,7 +1106,6 @@ def test_web_fetch_js_failure_exposes_private_browser_next_round(monkeypatch): [{"role": "user", "content": "open the official SpaceX Starship launches page"}], max_rounds=2, relevant_tools={"web_search", "web_fetch"}, - forced_tools={"web_search", "web_fetch"}, ) )