fix: normalize legacy valuation currency comparison

This commit is contained in:
2026-10-06 10:14:23 +00:00
parent 367583522b
commit 399d0923be
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -439,7 +439,12 @@ def test_legacy_lowercase_krw_account_currency_selects_normalized_valuation(tmp_
)
with sqlite3.connect(path) as conn:
conn.execute("UPDATE accounts SET currency='krw' WHERE id=?", (account,))
conn.execute("UPDATE account_valuations SET currency='krw' WHERE account_id=?", (account,))
selected = service.select_account_valuation(
account, "2026-06-30", currency="KRW", db_path=path,
)
report = service.get_asset_snapshot_report("2026-06-30", db_path=path)
assert selected["valuation"]["amount"] == 100
assert report["total_assets"] == 100
assert report["excluded_items"] == []