mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
chore: Fix evaluation test cases to only use pytest features
PiperOrigin-RevId: 820700378
This commit is contained in:
committed by
Copybara-Service
parent
9dce06f9b0
commit
cf3403231d
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user