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

Method test_custom_base_url

lib/cli/tests/test_plus_api.py:501–509  ·  view source on GitHub ↗
(self, mock_settings_class)

Source from the content-addressed store, hash-verified

499 @patch("crewai_core.plus_api.Settings")
500 @patch.dict(os.environ, {"CREWAI_PLUS_URL": ""})
501 def test_custom_base_url(self, mock_settings_class):
502 mock_settings = MagicMock()
503 mock_settings.enterprise_base_url = "https://custom-url.com/api"
504 mock_settings_class.return_value = mock_settings
505 custom_api = PlusAPI("test_key")
506 self.assertEqual(
507 custom_api.base_url,
508 "https://custom-url.com/api",
509 )
510
511 @patch.dict(os.environ, {"CREWAI_PLUS_URL": "https://custom-url-from-env.com"})
512 def test_custom_base_url_from_env(self):

Callers

nothing calls this directly

Calls 1

PlusAPIClass · 0.90

Tested by

no test coverage detected