test_sdk_exposes_everything_the_server_calls¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
`_sdk` is the ONE module that imports the SDK, so it is the single point of failure for the whole server on an SDK upgrade.
Verifies REQ-DDB-MCP-001 REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
for method in ("add_tool", "remove_tool", "list_tools", "run_stdio_async"): assert hasattr(_sdk.MCPServer, method), f"SDK server class lacks {method}"
When
- —
Then
- ✓ isinstance(_sdk.Context, type) holds
tests/test_mcp_server.py:460 · its file's page
What it checks (2)
assert hasattr(_sdk.MCPServer, method), f"SDK server class lacks {method}"not attributedassert isinstance(_sdk.Context, type), "Context must be a class — it is used as an annotation"not attributed
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (5)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-MCP-001 | catalog | unknown |
| REQ-DDB-MCP-003 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |