Skip to content

Commit 0790305

Browse files
committed
fix tests
1 parent 50f0d53 commit 0790305

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/mcp/server/fastmcp/resources/resource_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Resource manager functionality."""
22

3+
from __future__ import annotations as _annotations
4+
35
from collections.abc import Callable
46
from typing import TYPE_CHECKING, Any
57

@@ -73,7 +75,7 @@ def add_template(
7375
async def get_resource(
7476
self,
7577
uri: AnyUrl | str,
76-
context: "Context[ServerSessionT, LifespanContextT] | None" = None,
78+
context: Context[ServerSessionT, LifespanContextT] | None = None,
7779
) -> Resource | None:
7880
"""Get resource by URI, checking concrete resources first, then templates."""
7981
uri_str = str(uri)

tests/server/fastmcp/resources/test_resource_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def get_data(value: str) -> CustomData:
185185

186186
assert isinstance(resource, FunctionResource)
187187
content = await resource.read()
188-
assert content == "hello"
188+
assert content == '"hello"'
189189

190190
def test_context_parameter_detection(self):
191191
"""Test that context params are detected in ResourceTemplate.from_function()."""

0 commit comments

Comments
 (0)