Commit 480ae29 1 parent e8f1480 commit 480ae29 Copy full SHA for 480ae29
File tree 2 files changed +6
-5
lines changed
tests/server/fastmcp/auth
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 12
12
import anyio
13
13
import anyio .abc
14
14
import anyio .streams .memory
15
-
16
15
from httpx ._models import Request , Response
17
16
from httpx ._transports .base import AsyncBaseTransport
18
17
from httpx ._types import AsyncByteStream
Original file line number Diff line number Diff line change @@ -995,11 +995,13 @@ def test_tool(x: int) -> str:
995
995
return f"Result: { x } "
996
996
997
997
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
+ )
999
1002
test_client = httpx .AsyncClient (
1000
1003
transport = transport , base_url = "http://mcptest.com"
1001
1004
)
1002
- # test_client = httpx.AsyncClient(app=mcp.starlette_app(), base_url="http://mcptest.com")
1003
1005
1004
1006
# Test metadata endpoint
1005
1007
response = await test_client .get ("/.well-known/oauth-authorization-server" )
@@ -1090,8 +1092,8 @@ def test_tool(x: int) -> str:
1090
1092
assert sse .data .startswith ("/messages/?session_id=" )
1091
1093
messages_uri = sse .data
1092
1094
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
1095
1097
response = await test_client .post (
1096
1098
messages_uri ,
1097
1099
headers = {"Authorization" : authorization },
You can’t perform that action at this time.
0 commit comments