File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
tests/server/fastmcp/auth Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1212import anyio
1313import anyio .abc
1414import anyio .streams .memory
15-
1615from httpx ._models import Request , Response
1716from httpx ._transports .base import AsyncBaseTransport
1817from httpx ._types import AsyncByteStream
Original file line number Diff line number Diff line change @@ -995,11 +995,13 @@ def test_tool(x: int) -> str:
995995 return f"Result: { x } "
996996
997997 async with anyio .create_task_group () as task_group :
998- transport = StreamingASGITransport (app = mcp .starlette_app (), task_group = task_group ) # pyright: ignore
998+ transport = StreamingASGITransport (
999+ app = mcp .starlette_app (),
1000+ task_group = task_group ,
1001+ )
9991002 test_client = httpx .AsyncClient (
10001003 transport = transport , base_url = "http://mcptest.com"
10011004 )
1002- # test_client = httpx.AsyncClient(app=mcp.starlette_app(), base_url="http://mcptest.com")
10031005
10041006 # Test metadata endpoint
10051007 response = await test_client .get ("/.well-known/oauth-authorization-server" )
@@ -1090,8 +1092,8 @@ def test_tool(x: int) -> str:
10901092 assert sse .data .startswith ("/messages/?session_id=" )
10911093 messages_uri = sse .data
10921094
1093- # verify that we can now post to the /messages endpoint, and get a response
1094- # on the /sse endpoint
1095+ # verify that we can now post to the /messages endpoint,
1096+ # and get a response on the /sse endpoint
10951097 response = await test_client .post (
10961098 messages_uri ,
10971099 headers = {"Authorization" : authorization },
You can’t perform that action at this time.
0 commit comments