(zip_path: Path, **_: object)
| 2183 | uploaded: list[str] = [] |
| 2184 | |
| 2185 | def _upload(zip_path: Path, **_: object) -> MagicMock: |
| 2186 | with zipfile.ZipFile(zip_path) as archive: |
| 2187 | uploaded.extend(archive.namelist()) |
| 2188 | response = MagicMock() |
| 2189 | response.status_code = 201 |
| 2190 | response.is_success = True |
| 2191 | response.json.return_value = {"uuid": "zip-uuid", "status": "created"} |
| 2192 | return response |
| 2193 | |
| 2194 | command.plus_api_client.create_crew_from_zip.side_effect = _upload |
| 2195 |