Skip to content

Commit 3dd13de

Browse files
committed
explicitly run mcp.mount on test
1 parent 13c7ee2 commit 3dd13de

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

tests/test_mcp_complex_app.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
1212

1313

1414
@pytest.fixture
15-
def lowlevel_server_complex_app(complex_fastapi_app: FastAPI) -> Server:
15+
def fastapi_mcp(complex_fastapi_app: FastAPI) -> FastApiMCP:
1616
mcp = FastApiMCP(
1717
complex_fastapi_app,
1818
name="Test MCP Server",
1919
description="Test description",
2020
)
21-
return mcp.server
21+
mcp.mount()
22+
return mcp
23+
24+
25+
@pytest.fixture
26+
def lowlevel_server_complex_app(fastapi_mcp: FastApiMCP) -> Server:
27+
return fastapi_mcp.server
2228

2329

2430
@pytest.mark.asyncio

tests/test_mcp_simple_app.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
1212

1313

1414
@pytest.fixture
15-
def lowlevel_server_simple_app(simple_fastapi_app: FastAPI) -> Server:
15+
def fastapi_mcp(simple_fastapi_app: FastAPI) -> FastApiMCP:
1616
mcp = FastApiMCP(
1717
simple_fastapi_app,
1818
name="Test MCP Server",
1919
description="Test description",
2020
)
21-
return mcp.server
21+
mcp.mount()
22+
return mcp
23+
24+
25+
@pytest.fixture
26+
def lowlevel_server_simple_app(fastapi_mcp: FastApiMCP) -> Server:
27+
return fastapi_mcp.server
2228

2329

2430
@pytest.mark.asyncio

0 commit comments

Comments
 (0)