test: add per-asset balance fixture covering full Pezkuwi ecosystem (#43)

chains_for_testBalance.json only has one entry per chain (native balance
via a raw RPC query, bypassing the app's real sync pipeline entirely -
this is why it couldn't catch the 2026-07-09 HEZ-on-Asset-Hub silent
sync failure). This new fixture covers individual assets (HEZ/PEZ/USDT/
DOT/ETH/BTC across Pezkuwi's 3 chains) and is meant to drive a test that
goes through the real BalancesUpdateSystem -> AssetCache pipeline, which
is what actually caught that bug.
This commit is contained in:
2026-07-09 12:05:02 -07:00
committed by GitHub
parent b54c168719
commit dab727c43d
3 changed files with 119 additions and 0 deletions
+9
View File
@@ -349,6 +349,15 @@ def sync_tests():
save_json(OUTPUT_TESTS / "chains_for_testBalance.json", filtered)
print(f" chains_for_testBalance.json: {len(fixture)} - {dropped} not in {latest_version.name} + {added} Pezkuwi = {len(filtered)}")
# Per-asset fixture (pezkuwi_assets_for_testBalance.json) - unlike chains_for_testBalance.json above,
# this drives a test that goes through the REAL BalancesUpdateSystem/AssetCache pipeline rather than a
# raw RPC query, and covers individual assets (HEZ/PEZ/USDT/DOT/ETH/BTC) rather than just one native
# balance per chain. It's Pezkuwi's own curated list, published as-is - no Nova fixture to filter against.
pezkuwi_assets_file = PEZKUWI_OVERLAY / "tests" / "pezkuwi_assets_for_testBalance.json"
if pezkuwi_assets_file.exists():
save_json(OUTPUT_TESTS / "pezkuwi_assets_for_testBalance.json", load_json(pezkuwi_assets_file))
print(f" pezkuwi_assets_for_testBalance.json: {len(load_json(pezkuwi_assets_file)['assets'])} asset(s)")
def main():
print("=" * 60)