mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-13 15:14:50 -06:00
chore: fix function tool UT
PiperOrigin-RevId: 764567867
This commit is contained in:
parent
a0714b8afc
commit
b92e068155
@ -104,14 +104,16 @@ def test_init():
|
||||
assert tool.func == function_for_testing_with_no_args
|
||||
|
||||
|
||||
def test_function_returning_none():
|
||||
@pytest.mark.asyncio
|
||||
async def test_function_returning_none():
|
||||
"""Test that the function returns with None actually returning None."""
|
||||
tool = FunctionTool(function_returning_none)
|
||||
result = await tool.run_async(args={}, tool_context=MagicMock())
|
||||
assert result is None
|
||||
|
||||
|
||||
def test_function_returning_empty_dict():
|
||||
@pytest.mark.asyncio
|
||||
async def test_function_returning_empty_dict():
|
||||
"""Test that the function returns with empty dict actually returning empty dict."""
|
||||
tool = FunctionTool(function_returning_empty_dict)
|
||||
result = await tool.run_async(args={}, tool_context=MagicMock())
|
||||
|
Loading…
Reference in New Issue
Block a user