a2a-source-edit: write tests/test_agent.py
This commit is contained in:
@@ -65,6 +65,7 @@ def make_ctx() -> LocalRunContext[NoAuth]:
|
||||
workspace.outputs_prefix = "outputs"
|
||||
workspace.write_prefixes = ("outputs/",)
|
||||
workspace.current_mode = WorkspaceMode.READ_WRITE_OVERLAY
|
||||
workspace._apply_patches_directly = True
|
||||
return LocalRunContext(
|
||||
auth=NoAuth(),
|
||||
workspace=workspace,
|
||||
@@ -179,7 +180,10 @@ def test_execute_requires_digest_bound_approval(monkeypatch: Any) -> None:
|
||||
|
||||
def test_provider_timeout_returns_reconciliation(monkeypatch: Any) -> None:
|
||||
async def run() -> None:
|
||||
MockAsyncClient.queue = [httpx.TimeoutException("slow stripe")]
|
||||
MockAsyncClient.queue = [
|
||||
httpx.TimeoutException("slow stripe"),
|
||||
FakeResponse(200, {"ok": True, "ts": "3.4", "channel": "C123"}),
|
||||
]
|
||||
MockAsyncClient.calls = []
|
||||
monkeypatch.setattr("agent.httpx.AsyncClient", MockAsyncClient)
|
||||
agent = ReceivesSupportEmailChecks1919313()
|
||||
|
||||
Reference in New Issue
Block a user