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
|
|
@ -41,8 +41,8 @@ async def test_list_prompts_basic() -> None:
|
|||
result = await handler(request)
|
||||
|
||||
assert isinstance(result, ServerResult)
|
||||
assert isinstance(result.root, ListPromptsResult)
|
||||
assert result.root.prompts == test_prompts
|
||||
assert isinstance(result, ListPromptsResult)
|
||||
assert result.prompts == test_prompts
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
|
|
@ -67,8 +67,8 @@ async def test_list_resources_basic() -> None:
|
|||
result = await handler(request)
|
||||
|
||||
assert isinstance(result, ServerResult)
|
||||
assert isinstance(result.root, ListResourcesResult)
|
||||
assert result.root.resources == test_resources
|
||||
assert isinstance(result, ListResourcesResult)
|
||||
assert result.resources == test_resources
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
|
|
@ -114,8 +114,8 @@ async def test_list_tools_basic() -> None:
|
|||
result = await handler(request)
|
||||
|
||||
assert isinstance(result, ServerResult)
|
||||
assert isinstance(result.root, ListToolsResult)
|
||||
assert result.root.tools == test_tools
|
||||
assert isinstance(result, ListToolsResult)
|
||||
assert result.tools == test_tools
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
|
|
@ -135,8 +135,8 @@ async def test_list_prompts_empty() -> None:
|
|||
result = await handler(request)
|
||||
|
||||
assert isinstance(result, ServerResult)
|
||||
assert isinstance(result.root, ListPromptsResult)
|
||||
assert result.root.prompts == []
|
||||
assert isinstance(result, ListPromptsResult)
|
||||
assert result.prompts == []
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
|
|
@ -156,8 +156,8 @@ async def test_list_resources_empty() -> None:
|
|||
result = await handler(request)
|
||||
|
||||
assert isinstance(result, ServerResult)
|
||||
assert isinstance(result.root, ListResourcesResult)
|
||||
assert result.root.resources == []
|
||||
assert isinstance(result, ListResourcesResult)
|
||||
assert result.resources == []
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
|
|
@ -177,5 +177,5 @@ async def test_list_tools_empty() -> None:
|
|||
result = await handler(request)
|
||||
|
||||
assert isinstance(result, ServerResult)
|
||||
assert isinstance(result.root, ListToolsResult)
|
||||
assert result.root.tools == []
|
||||
assert isinstance(result, ListToolsResult)
|
||||
assert result.tools == []
|
||||
|
|
|
|||
Loading…
Reference in a new issue