Skip to content

Commit 66c226d

Browse files
correct version gating
1 parent facb079 commit 66c226d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/integrations/fastmcp/test_fastmcp.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ async def __call__(self, *args, **kwargs):
7676
GetPromptRequest = None
7777
ReadResourceRequest = None
7878

79+
from fastmcp import __version__ as FASTMCP_VERSION
7980

8081
# Collect available FastMCP implementations for parametrization
8182
fastmcp_implementations = []
@@ -391,7 +392,7 @@ async def multiply_numbers(x: int, y: int) -> dict:
391392
request_id="req-456",
392393
)
393394

394-
if isinstance(mcp, StandaloneFastMCP):
395+
if isinstance(mcp, StandaloneFastMCP) and FASTMCP_VERSION.startswith("2"):
395396
assert result.json()["result"]["structuredContent"] == {
396397
"result": 42,
397398
"operation": "multiplication",
@@ -998,7 +999,7 @@ def http_tool(data: str) -> dict:
998999
},
9991000
)
10001001

1001-
if isinstance(mcp, StandaloneFastMCP):
1002+
if isinstance(mcp, StandaloneFastMCP) and FASTMCP_VERSION.startswith("2"):
10021003
print("structured")
10031004
assert result.json()["result"]["structuredContent"] == {"processed": "TEST"}
10041005
else:

0 commit comments

Comments
 (0)