Merge pull request #342 from jlowin/prompt-test

Fix prompt test
This commit is contained in:
Jeremiah Lowin 2025-05-06 13:30:23 -04:00 committed by GitHub
commit e95b61a41b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,8 +85,8 @@ async def test_echo():
async with Client(mcp) as client:
result = await client.get_prompt("echo", {"text": "hello"})
assert len(result) == 1
assert isinstance(result[0], PromptMessage)
assert isinstance(result[0].content, TextContent)
assert isinstance(result[0].content.text, str)
assert result[0].content.text == "hello"
assert len(result.messages) == 1
assert isinstance(result.messages[0], PromptMessage)
assert isinstance(result.messages[0].content, TextContent)
assert isinstance(result.messages[0].content.text, str)
assert result.messages[0].content.text == "hello"