MCPcopy Create free account
hub / github.com/NVIDIA/SkillSpector / test_scp_valid_host_clones

Function test_scp_valid_host_clones

tests/unit/test_input_handler.py:111–123  ·  view source on GitHub ↗

resolve() calls git clone with the scp URL when the host is allowed.

()

Source from the content-addressed store, hash-verified

109
110
111def test_scp_valid_host_clones() -> None:
112 """resolve() calls git clone with the scp URL when the host is allowed."""
113 handler = InputHandler()
114 try:
115 with patch(
116 "skillspector.input_handler.subprocess.run", return_value=MagicMock()
117 ) as mock_run:
118 handler.resolve("git@github.com:org/repo.git")
119 assert mock_run.called
120 call_args = mock_run.call_args[0][0]
121 assert "git@github.com:org/repo.git" in call_args
122 finally:
123 handler.cleanup()
124
125
126def test_scp_disallowed_host_raises() -> None:

Callers

nothing calls this directly

Calls 3

resolveMethod · 0.95
cleanupMethod · 0.95
InputHandlerClass · 0.90

Tested by

no test coverage detected