Jeremiah Lowin commited on
Commit
980cbaf
·
1 Parent(s): 455ad8f

Add test for SHTTP

Browse files
tests/client/test_streamable_http.py CHANGED
@@ -106,7 +106,7 @@ async def test_http_headers(streamable_http_server: str):
106
 
107
  def run_nested_server(host: str, port: int) -> None:
108
  try:
109
- mcp_app = fastmcp_server().http_app()
110
 
111
  mount = Starlette(routes=[Mount("/nest-inner", app=mcp_app)])
112
  mount2 = Starlette(
@@ -135,7 +135,7 @@ async def test_nested_streamable_http_server_resolves_correctly():
135
 
136
  with run_server_in_process(run_nested_server) as url:
137
  async with Client(
138
- transport=StreamableHttpTransport(f"{url}/nest-outer/nest-inner/mcp")
139
  ) as client:
140
  result = await client.ping()
141
  assert result is True
 
106
 
107
  def run_nested_server(host: str, port: int) -> None:
108
  try:
109
+ mcp_app = fastmcp_server().http_app(path="/final/mcp")
110
 
111
  mount = Starlette(routes=[Mount("/nest-inner", app=mcp_app)])
112
  mount2 = Starlette(
 
135
 
136
  with run_server_in_process(run_nested_server) as url:
137
  async with Client(
138
+ transport=StreamableHttpTransport(f"{url}/nest-outer/nest-inner/final/mcp")
139
  ) as client:
140
  result = await client.ping()
141
  assert result is True