from agent.db import ensure_database, run_migrations from agent.jobs.heartbeat import run_heartbeat from agent.verify import verify class FakeFirefly: def about(self) -> dict: return {"version": "6.1.1"} def accounts(self, type: str = "asset") -> list[dict]: return [ {"id": "1", "attributes": {"name": "NFCU Checking"}}, {"id": "2", "attributes": {"name": "Venmo"}}, ] def test_verify_reports_db_firefly_and_accounts(cfg): ensure_database(cfg) run_migrations(cfg) run_heartbeat(cfg, client=FakeFirefly()) report = "\n".join(verify(cfg, client=FakeFirefly())) assert "1 migration(s) applied" in report assert "heartbeat ok" in report assert "firefly: OK (version 6.1.1)" in report assert "2 asset account(s)" in report assert "NFCU Checking" in report