refactor: use snake case instead of camel case in types (#1894)
This commit is contained in:
parent
7080fcf1e6
commit
e94b386a13
1 changed files with 1063 additions and 1057 deletions
|
|
@ -66,8 +66,8 @@ class TestClientOutputSchemaValidation:
|
|||
Tool(
|
||||
name="get_user",
|
||||
description="Get user data",
|
||||
inputSchema={"type": "object"},
|
||||
outputSchema=output_schema,
|
||||
input_schema={"type": "object"},
|
||||
output_schema=output_schema,
|
||||
)
|
||||
]
|
||||
|
||||
|
|
@ -105,8 +105,8 @@ class TestClientOutputSchemaValidation:
|
|||
Tool(
|
||||
name="calculate",
|
||||
description="Calculate something",
|
||||
inputSchema={"type": "object"},
|
||||
outputSchema=output_schema,
|
||||
input_schema={"type": "object"},
|
||||
output_schema=output_schema,
|
||||
)
|
||||
]
|
||||
|
||||
|
|
@ -136,8 +136,8 @@ class TestClientOutputSchemaValidation:
|
|||
Tool(
|
||||
name="get_scores",
|
||||
description="Get scores",
|
||||
inputSchema={"type": "object"},
|
||||
outputSchema=output_schema,
|
||||
input_schema={"type": "object"},
|
||||
output_schema=output_schema,
|
||||
)
|
||||
]
|
||||
|
||||
|
|
@ -171,8 +171,8 @@ class TestClientOutputSchemaValidation:
|
|||
Tool(
|
||||
name="get_person",
|
||||
description="Get person data",
|
||||
inputSchema={"type": "object"},
|
||||
outputSchema=output_schema,
|
||||
input_schema={"type": "object"},
|
||||
output_schema=output_schema,
|
||||
)
|
||||
]
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ class TestClientOutputSchemaValidation:
|
|||
|
||||
@pytest.mark.anyio
|
||||
async def test_tool_not_listed_warning(self, caplog: pytest.LogCaptureFixture):
|
||||
"""Test that client logs warning when tool is not in list_tools but has outputSchema"""
|
||||
"""Test that client logs warning when tool is not in list_tools but has output_schema"""
|
||||
server = Server("test-server")
|
||||
|
||||
@server.list_tools()
|
||||
|
|
@ -210,8 +210,8 @@ class TestClientOutputSchemaValidation:
|
|||
async with client_session(server) as client:
|
||||
# Call a tool that wasn't listed
|
||||
result = await client.call_tool("mystery_tool", {})
|
||||
assert result.structuredContent == {"result": 42}
|
||||
assert result.isError is False
|
||||
assert result.structured_content == {"result": 42}
|
||||
assert result.is_error is False
|
||||
|
||||
# Check that warning was logged
|
||||
assert "Tool mystery_tool not listed" in caplog.text
|
||||
|
|
|
|||
Loading…
Reference in a new issue