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

Method assert_request_with_org_id

lib/cli/tests/test_plus_api.py:33–47  ·  view source on GitHub ↗
(
        self, mock_client_instance, method: str, endpoint: str, **kwargs
    )

Source from the content-addressed store, hash-verified

31 self.assertEqual(response, mock_response)
32
33 def assert_request_with_org_id(
34 self, mock_client_instance, method: str, endpoint: str, **kwargs
35 ):
36 mock_client_instance.request.assert_called_once_with(
37 method,
38 f"{os.getenv('CREWAI_PLUS_URL')}{endpoint}",
39 headers={
40 "Authorization": ANY,
41 "Content-Type": ANY,
42 "User-Agent": ANY,
43 "X-Crewai-Version": ANY,
44 "X-Crewai-Organization-Id": self.org_uuid,
45 },
46 **kwargs,
47 )
48
49 @patch("crewai_core.plus_api.Settings")
50 @patch("crewai_core.plus_api.httpx.Client")

Calls

no outgoing calls

Tested by

no test coverage detected