(mock_make_request)
| 519 | |
| 520 | @patch("crewai_core.plus_api.PlusAPI._make_request") |
| 521 | def test_get_agent(mock_make_request): |
| 522 | api = PlusAPI("test_api_key") |
| 523 | mock_response = MagicMock() |
| 524 | mock_make_request.return_value = mock_response |
| 525 | |
| 526 | response = api.get_agent("test_agent_handle") |
| 527 | |
| 528 | mock_make_request.assert_called_once_with( |
| 529 | "GET", "/crewai_plus/api/v1/agents/test_agent_handle" |
| 530 | ) |
| 531 | assert response == mock_response |
| 532 | |
| 533 | |
| 534 | @patch("crewai_core.plus_api.PlusAPI._make_request") |