Skip to content

Commit 33ffe35

Browse files
committed
test: Fix first test for subprocess isolation and registration
#15 Branch: Run-15 Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
1 parent 21c6d3e commit 33ffe35

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/commands/server/test_run.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ class TestRunCommand:
2020

2121
def test_run_with_stdio_defaults(self) -> None:
2222
"""Test run command with stdio and default parameters."""
23-
with patch("cforge.commands.server.run.translate_main") as mock_translate:
24-
invoke_typer_command(run, stdio="uvx mcp-server-git")
25-
mock_translate.assert_called_once()
26-
args = mock_translate.call_args[0][0]
23+
with patch("mcpgateway.translate.main") as mock_translate, patch("multiprocessing.Process") as mock_process:
24+
invoke_typer_command(run, stdio="uvx mcp-server-git", register=False)
25+
mock_process.assert_called_once()
26+
call_args = mock_process.call_args[1]
27+
assert call_args.get("target") is mock_translate
28+
args = call_args["args"][0]
2729
assert "--stdio" in args
2830
assert "uvx mcp-server-git" in args
2931
assert "--port" in args

0 commit comments

Comments
 (0)