resolve() calls git clone with the scp URL when the host is allowed.
()
| 109 | |
| 110 | |
| 111 | def 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 | |
| 126 | def test_scp_disallowed_host_raises() -> None: |
nothing calls this directly
no test coverage detected