MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_guards_disabled

Method test_guards_disabled

tests/planning/test_backends.py:306–322  ·  view source on GitHub ↗

When enable_guards=False, no guard checks are performed.

(self)

Source from the content-addressed store, hash-verified

304
305 @pytest.mark.asyncio
306 async def test_guards_disabled(self):
307 """When enable_guards=False, no guard checks are performed."""
308 tm = FakeToolManager(result="ok")
309 backend = McpToolBackend(tm, enable_guards=False)
310
311 with patch(
312 "mcp_cli.planning.backends._check_guards",
313 ) as mock_check:
314 request = ToolExecutionRequest(
315 tool_name="read_file",
316 args={},
317 step_id="step-8",
318 )
319 result = await backend.execute_tool(request)
320
321 assert result.success
322 mock_check.assert_not_called()
323
324
325class TestCheckGuards:

Callers

nothing calls this directly

Calls 3

execute_toolMethod · 0.95
McpToolBackendClass · 0.90
FakeToolManagerClass · 0.70

Tested by

no test coverage detected