Completely drop RootModel from types module (#1910)
This commit is contained in:
parent
f4672c5084
commit
5fdd48a0d3
1 changed files with 640 additions and 800 deletions
|
|
@ -15,8 +15,6 @@ from mcp.types import (
|
|||
CallToolResult,
|
||||
CancelledNotification,
|
||||
CancelledNotificationParams,
|
||||
ClientNotification,
|
||||
ClientRequest,
|
||||
Tool,
|
||||
)
|
||||
|
||||
|
|
@ -59,11 +57,7 @@ async def test_server_remains_functional_after_cancel():
|
|||
async def first_request():
|
||||
try:
|
||||
await client.session.send_request(
|
||||
ClientRequest(
|
||||
CallToolRequest(
|
||||
params=CallToolRequestParams(name="test_tool", arguments={}),
|
||||
)
|
||||
),
|
||||
CallToolRequest(params=CallToolRequestParams(name="test_tool", arguments={})),
|
||||
CallToolResult,
|
||||
)
|
||||
pytest.fail("First request should have been cancelled") # pragma: no cover
|
||||
|
|
@ -80,13 +74,8 @@ async def test_server_remains_functional_after_cancel():
|
|||
# Cancel it
|
||||
assert first_request_id is not None
|
||||
await client.session.send_notification(
|
||||
ClientNotification(
|
||||
CancelledNotification(
|
||||
params=CancelledNotificationParams(
|
||||
request_id=first_request_id,
|
||||
reason="Testing server recovery",
|
||||
),
|
||||
)
|
||||
CancelledNotification(
|
||||
params=CancelledNotificationParams(request_id=first_request_id, reason="Testing server recovery"),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue