Files
AI-Trader/tests/unit
Bill bee6afe531 test: update ContextInjector tests to match production MCP behavior
Update unit tests to mock CallToolResult objects instead of plain dicts,
matching actual MCP tool behavior in production.

Changes:
- Add create_mcp_result() helper to create mock CallToolResult objects
- Update all mock handlers to return MCP result objects
- Update assertions to access result.structuredContent field
- Maintains test coverage while accurately reflecting production behavior

This ensures tests validate the actual code path used in production,
where MCP tools return CallToolResult objects with structuredContent
field containing the position dict.
2025-11-07 14:32:20 -05:00
..