mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
chore: fix the test_llm_agent_fields.py by adding a mock for google.auth.default
PiperOrigin-RevId: 816319357
This commit is contained in:
committed by
Copybara-Service
parent
4485379a04
commit
2699ad7aff
@@ -16,6 +16,7 @@
|
||||
|
||||
from typing import Any
|
||||
from typing import Optional
|
||||
from unittest import mock
|
||||
|
||||
from google.adk.agents.callback_context import CallbackContext
|
||||
from google.adk.agents.invocation_context import InvocationContext
|
||||
@@ -341,6 +342,10 @@ class TestCanonicalTools:
|
||||
assert tools[0].name == '_my_tool'
|
||||
assert tools[0].__class__.__name__ == 'FunctionTool'
|
||||
|
||||
@mock.patch(
|
||||
'google.auth.default',
|
||||
mock.MagicMock(return_value=('credentials', 'project')),
|
||||
)
|
||||
async def test_handle_google_vais_with_other_tools(self):
|
||||
"""Test that VertexAiSearchTool is wrapped into an agent."""
|
||||
agent = LlmAgent(
|
||||
|
||||
Reference in New Issue
Block a user