MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / test_install_api_error

Function test_install_api_error

lib/cli/tests/tools/test_main.py:183–193  ·  view source on GitHub ↗
(mock_get, capsys, tool_command)

Source from the content-addressed store, hash-verified

181
182@patch("crewai_cli.plus_api.PlusAPI.get_tool")
183def test_install_api_error(mock_get, capsys, tool_command):
184 mock_get_response = MagicMock()
185 mock_get_response.status_code = 500
186 mock_get.return_value = mock_get_response
187
188 with raises(SystemExit):
189 tool_command.install("error-tool")
190 output = capsys.readouterr().out
191 assert "Failed to get tool details" in output
192
193 mock_get.assert_called_once_with("error-tool")
194
195
196@patch("crewai_cli.tools.main.git.Repository")

Callers

nothing calls this directly

Calls 2

raisesFunction · 0.85
installMethod · 0.45

Tested by

no test coverage detected