chore: create union for working with message content (#939)
This commit is contained in:
parent
185fa49fd1
commit
d69b290b65
1 changed files with 25 additions and 51 deletions
|
|
@ -11,7 +11,7 @@ from anyio.abc import TaskStatus
|
|||
from mcp.client.session import ClientSession
|
||||
from mcp.server.lowlevel import Server
|
||||
from mcp.shared.exceptions import McpError
|
||||
from mcp.types import AudioContent, EmbeddedResource, ImageContent, TextContent
|
||||
from mcp.types import Content, TextContent
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
|
|
@ -31,7 +31,7 @@ async def test_notification_validation_error(tmp_path: Path):
|
|||
slow_request_complete = anyio.Event()
|
||||
|
||||
@server.call_tool()
|
||||
async def slow_tool(name: str, arg) -> Sequence[TextContent | ImageContent | AudioContent | EmbeddedResource]:
|
||||
async def slow_tool(name: str, arg) -> Sequence[Content]:
|
||||
nonlocal request_count
|
||||
request_count += 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue