(self, mock_make_multipart_request)
| 481 | |
| 482 | @patch("crewai_cli.plus_api.PlusAPI._make_multipart_request") |
| 483 | def test_update_crew_from_zip(self, mock_make_multipart_request): |
| 484 | self.api.update_crew_from_zip( |
| 485 | "test_uuid", |
| 486 | "/tmp/test.zip", |
| 487 | env={"ENV_VAR": "value"}, |
| 488 | ) |
| 489 | mock_make_multipart_request.assert_called_once_with( |
| 490 | "POST", |
| 491 | "/crewai_plus/api/v1/crews/test_uuid/zip_update", |
| 492 | zip_file_path="/tmp/test.zip", |
| 493 | data={"env[ENV_VAR]": "value"}, |
| 494 | timeout=300, |
| 495 | ) |
| 496 | self.api.update_crew_from_zip("test_uuid", "/tmp/test.zip", force=True) |
| 497 | assert mock_make_multipart_request.call_args.kwargs["data"] == {"force": "true"} |
| 498 | |
| 499 | @patch("crewai_core.plus_api.Settings") |
| 500 | @patch.dict(os.environ, {"CREWAI_PLUS_URL": ""}) |
nothing calls this directly
no test coverage detected