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