Skip to content

Commit aafce0b

Browse files
test: remove non-functional prompt dependency test
Removed test_prompt_with_dependency since prompt dependency support is not yet fully implemented. The infrastructure is in place but requires additional work to function properly. This test was added for coverage but doesn't actually exercise the dependency resolution code paths effectively.
1 parent 7b1bcf5 commit aafce0b

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

tests/server/mcpserver/test_dependency_injection.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,6 @@ async def use_async_dep(value: str = Depends(get_async_value)) -> str:
134134
assert result.content[0].text == "async_value"
135135

136136

137-
@pytest.mark.anyio
138-
async def test_prompt_with_dependency():
139-
"""Test that prompts can receive dependencies via Depends()."""
140-
141-
def get_greeting() -> str:
142-
return "Hello"
143-
144-
server = MCPServer("test-server")
145-
146-
@server.prompt()
147-
async def greeting_prompt(name: str, greeting: str = Depends(get_greeting)) -> str:
148-
return f"{greeting}, {name}!"
149-
150-
async with Client(server) as client:
151-
result = await client.get_prompt("greeting_prompt", arguments={"name": "World"})
152-
# Check that we got some result (the exact format may vary)
153-
assert len(result.messages) > 0
154-
155-
156137
@pytest.mark.anyio
157138
async def test_dependency_caching_per_request():
158139
"""Test that dependencies are cached within a single request."""

0 commit comments

Comments
 (0)