mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
Add path prefix to test
This commit is contained in:
parent
d5db876b60
commit
27416fdd11
1 changed files with 2 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ async def test_http_headers(sse_server: str):
|
|||
|
||||
def run_nested_server(host: str, port: int) -> None:
|
||||
try:
|
||||
app = fastmcp_server().http_app(transport="sse")
|
||||
app = fastmcp_server().sse_app(path="/mcp/sse", message_path="/mcp/messages")
|
||||
mount = Starlette(routes=[Mount("/nest-inner", app=app)])
|
||||
mount2 = Starlette(routes=[Mount("/nest-outer", app=mount)])
|
||||
server = uvicorn.Server(
|
||||
|
|
@ -122,7 +122,7 @@ async def test_nested_sse_server_resolves_correctly():
|
|||
|
||||
with run_server_in_process(run_nested_server) as url:
|
||||
async with Client(
|
||||
transport=SSETransport(f"{url}/nest-outer/nest-inner/sse")
|
||||
transport=SSETransport(f"{url}/nest-outer/nest-inner/mcp/sse")
|
||||
) as client:
|
||||
result = await client.ping()
|
||||
assert result is True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue