chore: Fix evaluation test cases to only use pytest features

PiperOrigin-RevId: 820700378
This commit is contained in:
Ankur Sharma
2025-10-17 08:25:17 -07:00
committed by Copybara-Service
parent 9dce06f9b0
commit cf3403231d
10 changed files with 176 additions and 175 deletions
@@ -14,8 +14,6 @@
from __future__ import annotations
from unittest import mock
from google.adk.agents.callback_context import CallbackContext
from google.adk.evaluation.request_intercepter_plugin import _LLM_REQUEST_ID_KEY
from google.adk.evaluation.request_intercepter_plugin import _RequestIntercepterPlugin
@@ -26,7 +24,7 @@ from google.genai import types
class TestRequestIntercepterPlugin:
async def test_intercept_request_and_response(self):
async def test_intercept_request_and_response(self, mocker):
plugin = _RequestIntercepterPlugin(name="test_plugin")
llm_request = LlmRequest(
model="test_model",
@@ -37,7 +35,7 @@ class TestRequestIntercepterPlugin:
)
],
)
mock_invocation_context = mock.MagicMock()
mock_invocation_context = mocker.MagicMock()
mock_invocation_context.session.state = {}
callback_context = CallbackContext(mock_invocation_context)
llm_response = LlmResponse()