From c663d41a86e06e9513bedb1195e8a298c0e4e388 Mon Sep 17 00:00:00 2001 From: Matthew Zhou Date: Wed, 4 Jun 2025 17:27:02 -0700 Subject: [PATCH] fix: Fix mcp test (#2642) --- tests/mcp/test_mcp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/mcp/test_mcp.py b/tests/mcp/test_mcp.py index 618e1700..41ee8e8c 100644 --- a/tests/mcp/test_mcp.py +++ b/tests/mcp/test_mcp.py @@ -150,10 +150,9 @@ async def test_sse_mcp_server(client, agent_state): assert tr.status == "success", f"Bad status: {tr.status}" # parse JSON payload full_payload = json.loads(tr.tool_return) - payload = json.loads(full_payload["message"]) - assert payload.get("successful", False), f"Tool returned failure payload: {payload}" - assert payload["data"]["details"] == "Action executed successfully", f"Unexpected details: {payload}" + assert full_payload.get("successful", False), f"Tool returned failure payload: {full_payload}" + assert full_payload["data"]["details"] == "Action executed successfully", f"Unexpected details: {full_payload}" def test_stdio_mcp_server(client, agent_state):