Skip to content

Commit 3fc5bcd

Browse files
fix: add type narrowing for content access in test
1 parent 4736bde commit 3fc5bcd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/client/test_sampling_callback.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ async def test_tool(message: str):
100100
async with create_session(server._mcp_server, sampling_callback=sampling_callback) as client_session:
101101
result = await client_session.call_tool("test_backwards_compat", {"message": "Test"})
102102
assert result.isError is False
103+
assert isinstance(result.content[0], TextContent)
103104
assert result.content[0].text == "true"
104105

105106

0 commit comments

Comments
 (0)