Skip to content

Commit d0411ac

Browse files
committed
test(fetch_tools): rewrite tests to use real MCP mock server
Replace monkeypatch-based tests with integration tests using the actual MCP protocol via the Hono mock server. This provides more realistic coverage of the fetch_tools() implementation. Changes: - Rename test_toolset_mcp.py to test_fetch_tools.py for clarity - Use mcp_mock_server fixture for most tests (real MCP protocol) - Keep monkeypatch tests only for schema normalisation logic - Add integration marker for MCP server tests - Add tests for MCP headers, tool creation, and RPC execution The tests now exercise the full MCP client flow including _fetch_mcp_tools(), header building, and tool response parsing.
1 parent bdde1fa commit d0411ac

File tree

2 files changed

+204
-175
lines changed

2 files changed

+204
-175
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ asyncio_mode = "strict"
6969
asyncio_default_fixture_loop_scope = "function"
7070
markers = [
7171
"asyncio: mark test as async",
72+
"integration: mark test as integration test requiring MCP mock server",
7273
]
7374

7475
[tool.ruff.lint.per-file-ignores]

0 commit comments

Comments
 (0)