Skip to content

Commit d07eb10

Browse files
committed
Fixing unit tests
1 parent 645aede commit d07eb10

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

examples/mcp/caching/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def run(mcp_server: MCPServerStreamableHttp):
2222
print("Cached prompts before invoking list_prompts")
2323
print(mcp_server._prompts_list)
2424

25-
print("\nCached prompts after invoking list_prompts")
25+
print("Cached prompts after invoking list_prompts")
2626
await mcp_server.list_prompts()
2727
cached_prompts_list = mcp_server._prompts_list
2828
for prompt in cached_prompts_list.prompts:

tests/mcp/helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self, tool_filter: ToolFilter, server_name: str):
3838
# Initialize parent class properly to avoid type errors
3939
super().__init__(
4040
cache_tools_list=False,
41+
cache_prompts_list=False,
4142
client_session_timeout_seconds=None,
4243
tool_filter=tool_filter,
4344
)

tests/mcp/test_server_errors.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
class CrashingClientSessionServer(_MCPServerWithClientSession):
1010
def __init__(self):
11-
super().__init__(cache_tools_list=False, client_session_timeout_seconds=5)
11+
super().__init__(
12+
cache_tools_list=False,
13+
cache_prompts_list=False,
14+
client_session_timeout_seconds=5
15+
)
1216
self.cleanup_called = False
1317

1418
def create_streams(self):

0 commit comments

Comments
 (0)