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