File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
tests/integrations/fastmcp Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,10 @@ async def multiply_numbers(x: int, y: int) -> dict:
397397 "result" : 42 ,
398398 "operation" : "multiplication" ,
399399 }
400+ elif isinstance (mcp , StandaloneFastMCP ) and FASTMCP_VERSION .startswith ("0" ):
401+ assert result .json ()["result" ]["content" ][0 ]["text" ] == json .dumps (
402+ {"result" : 42 , "operation" : "multiplication" },
403+ )
400404 else :
401405 assert result .json ()["result" ]["content" ][0 ]["text" ] == json .dumps (
402406 {"result" : 42 , "operation" : "multiplication" },
@@ -1000,8 +1004,11 @@ def http_tool(data: str) -> dict:
10001004 )
10011005
10021006 if isinstance (mcp , StandaloneFastMCP ) and FASTMCP_VERSION .startswith ("2" ):
1003- print ("structured" )
10041007 assert result .json ()["result" ]["structuredContent" ] == {"processed" : "TEST" }
1008+ elif isinstance (mcp , StandaloneFastMCP ) and FASTMCP_VERSION .startswith ("0" ):
1009+ assert result .json ()["result" ]["content" ][0 ]["text" ] == json .dumps (
1010+ {"processed" : "TEST" },
1011+ )
10051012 else :
10061013 assert result .json ()["result" ]["content" ][0 ]["text" ] == json .dumps (
10071014 {"processed" : "TEST" },
You can’t perform that action at this time.
0 commit comments