fastmcp/tests/client/tasks
Chris Guidry f2006804d2 fix: prompt tasks returning mcp.types.PromptMessage now work
When a prompt function returned `mcp.types.PromptMessage` objects directly
and was executed as a task, the result serialization failed with
"'PromptMessage' object has no attribute 'to_mcp'".

The task result converter was calling `.to_mcp()` on what it thought was a
FastMCP wrapper type, but the import actually pulls in `mcp.types.PromptMessage`
directly, which is already the final MCP type. Removed the unnecessary
conversion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 12:57:04 -05:00
..
conftest.py Remove enable_tasks setting, enable task protocol by default 2025-12-09 09:34:42 -05:00
test_client_prompt_tasks.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_client_resource_tasks.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_client_task_notifications.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_client_task_protocol.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_client_tool_tasks.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_prompt_task_mcp_message.py fix: prompt tasks returning mcp.types.PromptMessage now work 2025-12-12 12:57:04 -05:00
test_task_context_validation.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_result_caching.py Add TaskConfig for SEP-1686 execution modes 2025-12-06 21:01:11 -05:00