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:35–49  ·  view source on GitHub ↗
(
        self, mock_client_instance, method: str, endpoint: str, **kwargs
    )

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected