Skip to content

Commit 5cbbff5

Browse files
committed
Fix sampling validation test expectations
1 parent 560de5c commit 5cbbff5

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

tests/interaction/lowlevel/test_sampling.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,7 @@ async def sampling_callback(
395395

396396
assert result == snapshot(
397397
CallToolResult(
398-
content=[
399-
TextContent(text="ValueError: The last message must contain only tool_result content if any is present")
400-
]
398+
content=[TextContent(text="ValueError: A message must contain only tool_result content if any is present")]
401399
)
402400
)
403401

tests/server/test_session.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ async def test_send_request_without_back_channel_or_related_id_fails_fast():
128128
@pytest.mark.anyio
129129
async def test_create_message_tool_result_validation():
130130
"""Test tool_use/tool_result validation in create_message."""
131-
dispatcher = StubDispatcher(
132-
result={"role": "assistant", "content": [{"type": "text", "text": "ok"}], "model": "m"}
133-
)
131+
dispatcher = StubDispatcher(result={"role": "assistant", "content": [{"type": "text", "text": "ok"}], "model": "m"})
134132
session = _make_session(
135133
dispatcher, capabilities=ClientCapabilities(sampling=SamplingCapability(tools=SamplingToolsCapability()))
136134
)

0 commit comments

Comments
 (0)