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

Method _api_response

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

Source from the content-addressed store, hash-verified

1169
1170 @staticmethod
1171 def _api_response(status_code: int, body: object) -> MagicMock:
1172 response = MagicMock()
1173 response.status_code = status_code
1174 response.is_success = 200 <= status_code < 300
1175 if isinstance(body, Exception):
1176 response.json.side_effect = body
1177 else:
1178 response.json.return_value = body
1179 return response
1180
1181 @patch("crewai_cli.deploy.main.fetch_and_json_env_file")
1182 @patch("crewai_cli.deploy.main.git.Repository")

Calls

no outgoing calls

Tested by

no test coverage detected