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:
parent
d3ea9009b0
commit
e598750cba
1 changed files with 211 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue