Unify component storage in LocalProvider (#2680)

This commit is contained in:
Jeremiah Lowin 2025-12-23 19:24:09 -05:00 committed by GitHub
commit f36b147f60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 4467 additions and 6015 deletions

View file

@ -137,7 +137,7 @@ async def test_async_resource_with_task_true_remains_enabled():
return "data"
# Resource should have task mode="optional" and be a FunctionResource
resource = await mcp._resource_manager.get_resource("test://async")
resource = await mcp.get_resource("test://async")
assert isinstance(resource, FunctionResource)
assert resource.task_config.mode == "optional"
@ -179,7 +179,7 @@ async def test_sync_resource_with_task_false_works():
"""A synchronous resource."""
return "data"
resource = await mcp._resource_manager.get_resource("test://sync")
resource = await mcp.get_resource("test://sync")
assert isinstance(resource, FunctionResource)
assert resource.task_config.mode == "forbidden"