Skip to content

Commit 31d32b7

Browse files
restore previous assertions
1 parent 1b1cec5 commit 31d32b7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/integrations/mcp/test_mcp.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ async def test_tool_async(tool_name, arguments):
331331
},
332332
request_id="req-456",
333333
)
334-
assert not result.json()["result"]["isError"]
334+
assert result.json()["result"]["content"][0]["text"] == json.dumps(
335+
{"status": "completed"}
336+
)
335337

336338
transactions = select_transactions_with_mcp_spans(events, "tools/call")
337339
assert len(transactions) == 1
@@ -657,14 +659,14 @@ async def test_resource_async(uri):
657659
},
658660
)
659661

660-
transactions = select_transactions_with_mcp_spans(events, "resources/read")
661-
assert len(transactions) == 1
662-
tx = transactions[0]
663-
664662
assert result.json()["result"]["contents"][0]["text"] == json.dumps(
665663
{"data": "resource data"}
666664
)
667665

666+
transactions = select_transactions_with_mcp_spans(events, "resources/read")
667+
assert len(transactions) == 1
668+
tx = transactions[0]
669+
668670
assert tx["type"] == "transaction"
669671
assert len(tx["spans"]) == 1
670672

@@ -1137,7 +1139,9 @@ async def test_tool(tool_name, arguments):
11371139
"arguments": {},
11381140
},
11391141
)
1140-
assert not result.json()["result"]["isError"]
1142+
assert result.json()["result"]["content"][0]["text"] == json.dumps(
1143+
{"status": "success"}
1144+
)
11411145

11421146
transactions = select_transactions_with_mcp_spans(events, "tools/call")
11431147
assert len(transactions) == 1

0 commit comments

Comments
 (0)