broker-sync/tests
Viktor Barzin ea881e272b sinks: match Wealthfolio NewAccount camelCase schema + required booleans
Wealthfolio 3.2's POST /api/v1/accounts was 422ing on live traffic — its
NewAccount struct uses camelCase field names and requires isDefault +
isActive as booleans. Reference:
https://github.com/afadil/wealthfolio/blob/main/apps/server/src/models.rs#L~145

Sends trackingMode=TRANSACTIONS so Wealthfolio computes holdings from
our imported activities (vs HOLDINGS mode which requires periodic
holdings snapshots). Populates providerAccountId so the broker account
is traceable back to our sync's id scheme.

Test plan:
  poetry run pytest -q   →  70 passed
  poetry run mypy        →  clean
  poetry run ruff check  →  clean

Live re-run of the backfill Job follows this commit's image rebuild.
2026-04-17 20:29:43 +00:00
..
fixtures Add ECB FX fetcher + cache population 2026-04-17 19:32:23 +00:00
providers Wire T212 pagination, retries, and click<8.2 pin 2026-04-17 19:45:23 +00:00
sinks sinks: match Wealthfolio NewAccount camelCase schema + required booleans 2026-04-17 20:29:43 +00:00
__init__.py Initial scaffold + canonical Activity model 2026-04-17 19:16:11 +00:00
test_cli.py Add typer CLI + production Dockerfile 2026-04-17 19:23:54 +00:00
test_dedup.py Add SyncRecordStore for authoritative dedup 2026-04-17 19:17:12 +00:00
test_fx.py Add FxCache and convert_to_gbp core 2026-04-17 19:18:41 +00:00
test_fx_ecb.py Add ECB FX fetcher + cache population 2026-04-17 19:32:23 +00:00
test_models.py Initial scaffold + canonical Activity model 2026-04-17 19:16:11 +00:00
test_normaliser.py Add Provider protocol and normaliser 2026-04-17 19:20:12 +00:00
test_pipeline.py Add sync pipeline + trading212 CLI subcommand 2026-04-17 19:45:43 +00:00