Skip to content

Commit cdf23f3

Browse files
committed
Fix sampling validation test expectations
1 parent 5a51056 commit cdf23f3

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
@@ -161,9 +161,7 @@ async def test_send_request_skips_the_surface_gate_when_method_absent_at_version
161161
@pytest.mark.anyio
162162
async def test_create_message_tool_result_validation():
163163
"""Test tool_use/tool_result validation in create_message."""
164-
dispatcher = StubDispatcher(
165-
result={"role": "assistant", "content": [{"type": "text", "text": "ok"}], "model": "m"}
166-
)
164+
dispatcher = StubDispatcher(result={"role": "assistant", "content": [{"type": "text", "text": "ok"}], "model": "m"})
167165
session = _make_session(
168166
dispatcher, capabilities=ClientCapabilities(sampling=SamplingCapability(tools=SamplingToolsCapability()))
169167
)

0 commit comments

Comments
 (0)