feat: add Nailong Fund advisor capabilities
This commit is contained in:
@@ -44,10 +44,11 @@ def test_create_agent_run_returns_202_and_addresses() -> None:
|
||||
)
|
||||
assert response.status_code == 202
|
||||
body = response.json()
|
||||
assert body["run_id"]
|
||||
assert body["trace_id"]
|
||||
assert body["status"] == "queued"
|
||||
assert body["status_url"].endswith(body["run_id"])
|
||||
assert body["data"]["run_id"]
|
||||
assert body["data"]["trace_id"]
|
||||
assert body["meta"]["trace_id"] == body["data"]["trace_id"]
|
||||
assert body["data"]["status"] == "queued"
|
||||
assert body["data"]["status_url"].endswith(body["data"]["run_id"])
|
||||
finally:
|
||||
async def cleanup() -> None:
|
||||
async with SessionFactory() as session:
|
||||
|
||||
@@ -40,11 +40,11 @@ async def test_http_accept_worker_commit_query_and_repeat(acceptance_registry, r
|
||||
"session_id": session_id, "idempotency_key": str(uuid4()),
|
||||
})
|
||||
assert response.status_code == 202
|
||||
run_id = response.json()["run_id"]
|
||||
run_id = response.json()["data"]["run_id"]
|
||||
assert await runtime.dispatch_one(run_id=run_id)
|
||||
assert not await runtime.dispatch_one(run_id=run_id)
|
||||
await asyncio.gather(runtime.execute(run_id), runtime.execute(run_id))
|
||||
result = (await client.get(f"/api/v1/agent-runs/{run_id}")).json()
|
||||
result = (await client.get(f"/api/v1/agent-runs/{run_id}")).json()["data"]
|
||||
assert result["status"] == ("failed" if revoked else "succeeded")
|
||||
if not revoked:
|
||||
assert result["result"]["content"] == "test result"
|
||||
|
||||
Reference in New Issue
Block a user