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

Method test_update_crew_from_zip

lib/cli/tests/test_plus_api.py:483–497  ·  view source on GitHub ↗
(self, mock_make_multipart_request)

Source from the content-addressed store, hash-verified

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": ""})

Callers

nothing calls this directly

Calls 1

update_crew_from_zipMethod · 0.45

Tested by

no test coverage detected