MCPcopy Create free account
hub / github.com/IBM/mcp-cli / _make_server

Function _make_server

tests/context/test_context_manager.py:36–46  ·  view source on GitHub ↗

Create a minimal ServerInfo for testing.

(name: str = "test-server", **overrides)

Source from the content-addressed store, hash-verified

34
35
36def _make_server(name: str = "test-server", **overrides) -> ServerInfo:
37 """Create a minimal ServerInfo for testing."""
38 defaults = dict(
39 id=0,
40 name=name,
41 status="connected",
42 tool_count=0,
43 namespace="stdio",
44 )
45 defaults.update(overrides)
46 return ServerInfo(**defaults)
47
48
49def _make_tool(name: str = "tool1", namespace: str = "ns", **overrides) -> ToolInfo:

Calls 2

ServerInfoClass · 0.90
updateMethod · 0.80

Tested by

no test coverage detected