mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-12-18 11:22:22 -06:00
fix: fix application integration toolset
PiperOrigin-RevId: 759018346
This commit is contained in:
committed by
Copybara-Service
parent
9c2358e2a5
commit
4a0751941b
@@ -15,6 +15,7 @@
|
||||
import json
|
||||
from unittest import mock
|
||||
from fastapi.openapi.models import Operation
|
||||
from google.adk.agents.readonly_context import ReadonlyContext
|
||||
from google.adk.auth.auth_credential import AuthCredential
|
||||
from google.adk.tools.application_integration_tool.application_integration_toolset import ApplicationIntegrationToolset
|
||||
from google.adk.tools.application_integration_tool.integration_connector_tool import IntegrationConnectorTool
|
||||
@@ -49,7 +50,7 @@ def mock_openapi_toolset():
|
||||
mock_rest_api_tool.name = "Test Tool"
|
||||
|
||||
# Create an async mock for the get_tools method
|
||||
async def mock_get_tools():
|
||||
async def mock_get_tools(context: ReadonlyContext = None):
|
||||
return [mock_rest_api_tool]
|
||||
|
||||
# Assign the async mock function to get_tools
|
||||
@@ -71,7 +72,7 @@ def mock_openapi_toolset_with_multiple_tools_and_no_tools():
|
||||
mock_rest_api_tool_2.name = "Test Tool 2"
|
||||
|
||||
# Create an async mock for the get_tools method
|
||||
async def mock_get_tools():
|
||||
async def mock_get_tools(context: ReadonlyContext = None):
|
||||
return [mock_rest_api_tool, mock_rest_api_tool_2]
|
||||
|
||||
mock_toolset_instance.get_tools = mock_get_tools
|
||||
|
||||
Reference in New Issue
Block a user