MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / test_engine_succeeds_headless

Function test_engine_succeeds_headless

tests/test_mcp_command.py:124–136  ·  view source on GitHub ↗
(isolated_config)

Source from the content-addressed store, hash-verified

122# F. Engine end-to-end on a NullUIHost surface — no headless error (unlike pickers)
123# --------------------------------------------------------------------------- #
124async def test_engine_succeeds_headless(isolated_config):
125 tmp = isolated_config
126 _set_servers({"a": {"name": "alpha"}})
127 reg = CommandRegistry()
128 reg.register(MCP_COMMAND)
129 ctx = create_command_context(workspace_root=tmp, cwd=tmp) # ui=None → engine subs NullUIHost
130 eng = CommandEngine(registry=reg, workspace_root=tmp, context=ctx)
131
132 result = await eng.execute("/mcp")
133
134 assert result.success is True
135 assert result.result_type == "text"
136 assert result.text.startswith("MCP servers:")

Callers

nothing calls this directly

Calls 6

registerMethod · 0.95
executeMethod · 0.95
CommandRegistryClass · 0.90
create_command_contextFunction · 0.90
CommandEngineClass · 0.90
_set_serversFunction · 0.85

Tested by

no test coverage detected