(self, mock_make_request)
| 26 | |
| 27 | @patch("crewai_core.plus_api.PlusAPI._make_request") |
| 28 | def test_create_evaluation(self, mock_make_request): |
| 29 | mock_response = MagicMock() |
| 30 | mock_make_request.return_value = mock_response |
| 31 | |
| 32 | response = self.api.create_evaluation("6f31fe1a-20bd-4bfe-a011-25d6b9341f62") |
| 33 | |
| 34 | mock_make_request.assert_called_once_with( |
| 35 | "POST", |
| 36 | "/crewai_plus/api/v1/tracing/evaluations", |
| 37 | json={"execution_id": "6f31fe1a-20bd-4bfe-a011-25d6b9341f62"}, |
| 38 | timeout=120.0, # AMP reads the run's spans inside this request |
| 39 | ) |
| 40 | self.assertEqual(response, mock_response) |
| 41 | |
| 42 | @patch("crewai_core.plus_api.PlusAPI._make_request") |
| 43 | def test_get_integration_token_works_with_older_core(self, mock_make_request): |
nothing calls this directly
no test coverage detected