migration
This commit is contained in:
@@ -35,22 +35,12 @@ class TestMcpHttpEndpoints:
|
||||
"""Covers MCP transport endpoint smoke behavior."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_rejects_get_stream_without_support(
|
||||
self,
|
||||
client: AsyncClient,
|
||||
mcp_session_factory,
|
||||
) -> None:
|
||||
"""Ensures GET /mcp returns method not allowed for current transport mode."""
|
||||
response = await client.get(
|
||||
"/mcp",
|
||||
headers={"Accept": "text/event-stream"},
|
||||
)
|
||||
|
||||
async def test_exposes_no_tools(self, mcp_session_factory) -> None:
|
||||
"""Ensures the server publishes only native resource and prompt surfaces."""
|
||||
async with mcp_session_factory() as mcp_session:
|
||||
# Keep the SDK-backed session in use for this route smoke lane.
|
||||
await mcp_session.list_tools()
|
||||
result = await mcp_session.list_tools()
|
||||
|
||||
assert response.status_code == 405
|
||||
assert result.tools == []
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_accepts_initialize_jsonrpc_request(
|
||||
@@ -61,5 +51,5 @@ class TestMcpHttpEndpoints:
|
||||
async with mcp_session_factory(initialize=False) as mcp_session_uninitialized:
|
||||
initialize_result = await mcp_session_uninitialized.initialize()
|
||||
|
||||
assert initialize_result.protocolVersion
|
||||
assert initialize_result.serverInfo.name
|
||||
assert initialize_result.protocol_version
|
||||
assert initialize_result.server_info.name
|
||||
|
||||
Reference in New Issue
Block a user