Skip to content

Commit dab125e

Browse files
authored
Remove test warnings (#2331)
1 parent 321f404 commit dab125e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ fallback-version = "0.0.0"
103103
[tool.pytest.ini_options]
104104
asyncio_mode = "auto"
105105
# filterwarnings = ["error::DeprecationWarning"]
106+
filterwarnings = [
107+
# Suppress OAuth in-memory token storage warnings in tests
108+
# Tests intentionally use ephemeral storage; this warning is for end users
109+
"ignore:Using in-memory token storage:UserWarning",
110+
]
106111
timeout = 5
107112
env = [
108113
"FASTMCP_TEST_MODE=1",

tests/client/test_sse.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,13 @@ async def nested_sse_server():
9494
from starlette.applications import Starlette
9595
from starlette.routing import Mount
9696

97+
from fastmcp.server.http import create_sse_app
9798
from fastmcp.utilities.http import find_available_port
9899

99100
server = create_test_server()
100-
sse_app = server.sse_app(path="/mcp/sse/", message_path="/mcp/messages")
101+
sse_app = create_sse_app(
102+
server=server, message_path="/mcp/messages", sse_path="/mcp/sse/"
103+
)
101104

102105
# Nest the app under multiple mounts to test URL resolution
103106
inner = Starlette(routes=[Mount("/nest-inner", app=sse_app)])

0 commit comments

Comments
 (0)