a2a-source-edit: write tests/test_agent.py
This commit is contained in:
@@ -3,7 +3,7 @@ import pytest
|
||||
from a2a_pack import NoAuth
|
||||
from a2a_pack.context import LocalRunContext
|
||||
|
||||
from agent import CustomerIntegrationEngineer
|
||||
from agent import CustomerIntegrationEngineer, SmokeCallInput
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -31,14 +31,14 @@ async def test_smoke_call_rejects_secret_like_result():
|
||||
|
||||
result = await agent.validate_smoke_call(
|
||||
ctx,
|
||||
{
|
||||
"skill_name": "validate_live_card",
|
||||
"input_args": {"bounded": True},
|
||||
"result": {"ok": True, "api_key": "sk-testsecret1234567890"},
|
||||
"status_code": 200,
|
||||
"used_workspace_delegation": True,
|
||||
"delegated_workspace_mode": "read_only",
|
||||
},
|
||||
SmokeCallInput(
|
||||
skill_name="validate_live_card",
|
||||
input_args={"bounded": True},
|
||||
result={"ok": True, "api_key": "sk-testsecret1234567890"},
|
||||
status_code=200,
|
||||
used_workspace_delegation=True,
|
||||
delegated_workspace_mode="read_only",
|
||||
),
|
||||
)
|
||||
|
||||
assert result["ok"] is False
|
||||
|
||||
Reference in New Issue
Block a user