test: validate ledger backfill flow

Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-08-24 10:25:35 +00:00
committed by GitHub
co-authored by genichin
parent e2c4bbba34
commit 3e74d35299
3 changed files with 17 additions and 14 deletions
+2 -2
View File
@@ -147,8 +147,8 @@ def test_ledger_backfill_existing_completed_row_is_idempotent(monkeypatch, tmp_p
def process_correlation_id(self, correlation_id):
raise AssertionError("completed execution must not be re-processed")
import trex_core.adapters.persistence.postgresql as pg_mod
import trex_core.adapters.ledger.portfolio_hub as hub_mod
import trex_core.adapters.persistence.postgresql as pg_mod
monkeypatch.setattr(pg_mod, "PostgreSQLLedgerOutbox", lambda dsn: _Outbox())
monkeypatch.setattr(hub_mod, "PortfolioHubLedger", lambda *args, **kwargs: object())
@@ -195,8 +195,8 @@ def test_ledger_backfill_live_enqueue_and_processes_exact_trade(monkeypatch, tmp
assert correlation_id == self.seen_outbox.trade.correlation_id
return OutboxOutcome.COMPLETED
import trex_core.adapters.persistence.postgresql as pg_mod
import trex_core.adapters.ledger.portfolio_hub as hub_mod
import trex_core.adapters.persistence.postgresql as pg_mod
monkeypatch.setattr(pg_mod, "PostgreSQLLedgerOutbox", lambda dsn: outbox)
monkeypatch.setattr(hub_mod, "PortfolioHubLedger", lambda *args, **kwargs: object())