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

Method _api_response

lib/cli/tests/deploy/test_deploy_main.py:1155–1163  ·  view source on GitHub ↗
(status_code: int, body: object)

Source from the content-addressed store, hash-verified

1153
1154 @staticmethod
1155 def _api_response(status_code: int, body: object) -> MagicMock:
1156 response = MagicMock()
1157 response.status_code = status_code
1158 response.is_success = 200 <= status_code < 300
1159 if isinstance(body, Exception):
1160 response.json.side_effect = body
1161 else:
1162 response.json.return_value = body
1163 return response
1164
1165 @patch("crewai_cli.deploy.main.fetch_and_json_env_file")
1166 @patch("crewai_cli.deploy.main.git.Repository")

Calls

no outgoing calls

Tested by

no test coverage detected