refactor: use snake case instead of camel case in types (#1894)

This commit is contained in:
Marcelo Trylesinski 2026-01-16 15:51:27 +01:00 • committed by GitHub
commit e94b386a13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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