mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2026-01-02 13:44:18 +01:00
test: add tests for server lifespan support
Adds comprehensive tests for lifespan functionality: - Tests for both low-level Server and FastMCP classes - Coverage for startup, shutdown, and context access - Verifies context passing to request handlers
This commit is contained in:
@@ -20,7 +20,10 @@ async def test_progress_token_zero_first_call():
|
||||
mock_meta.progressToken = 0 # This is the key test case - token is 0
|
||||
|
||||
request_context = RequestContext(
|
||||
request_id="test-request", session=mock_session, meta=mock_meta
|
||||
request_id="test-request",
|
||||
session=mock_session,
|
||||
meta=mock_meta,
|
||||
lifespan_context=None,
|
||||
)
|
||||
|
||||
# Create context with our mocks
|
||||
|
||||
Reference in New Issue
Block a user