Test that the client is initialized after entering context.
(app: MCPServer)
| 107 | |
| 108 | |
| 109 | async def test_client_is_initialized(app: MCPServer): |
| 110 | """Test that the client is initialized after entering context.""" |
| 111 | async with Client(app, mode="legacy") as client: |
| 112 | assert client.server_capabilities == snapshot( |
| 113 | ServerCapabilities( |
| 114 | experimental={}, |
| 115 | prompts=PromptsCapability(list_changed=False), |
| 116 | resources=ResourcesCapability(subscribe=False, list_changed=False), |
| 117 | tools=ToolsCapability(list_changed=False), |
| 118 | ) |
| 119 | ) |
| 120 | assert client.server_info.name == "test" |
| 121 | |
| 122 | |
| 123 | async def test_client_exposes_negotiated_protocol_version(app: MCPServer): |
nothing calls this directly
no test coverage detected