(status_code: int, body: object)
| 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") |
no outgoing calls
no test coverage detected