[verified] Implement account valuation history for issue 12
This commit is contained in:
@@ -67,6 +67,11 @@ def _build_contract_fixture(db_path: str) -> None:
|
||||
)
|
||||
assert account["success"] is True
|
||||
account_id = account["account"]["id"]
|
||||
assert service.register_account_valuation(
|
||||
account_id, "2026-06-30", 1_000_000, verification_status="verified",
|
||||
source_type="manual", source_ref="contract-fixture", idempotency_key="contract-account-v1",
|
||||
db_path=db_path,
|
||||
)["success"] is True
|
||||
assert service.create_ledger_transaction(
|
||||
"2026-06-01",
|
||||
"income",
|
||||
@@ -114,8 +119,9 @@ def test_list_report_and_mutation_success_envelope_contract(tmp_path: Path) -> N
|
||||
db_path = str(tmp_path / "contract-fixture.sqlite3")
|
||||
_build_contract_fixture(db_path)
|
||||
|
||||
mutation = service.create_ledger_account("Synthetic Savings", type="bank", liquidity_bucket="deposit", db_path=db_path)
|
||||
mutation = service.create_ledger_account("Synthetic Savings", type="bank", liquidity_bucket="deposit", last_balance=0, last_synced_at="2026-06-30", db_path=db_path)
|
||||
assert mutation["success"] is True
|
||||
assert service.register_account_valuation(mutation["account"]["id"], "2026-06-30", 0, verification_status="verified", idempotency_key="savings-v1", db_path=db_path)["success"]
|
||||
_assert_subset_schema(mutation, contract["mutation_success_envelope"], "mutation_success_envelope")
|
||||
|
||||
manual_asset = service.create_manual_asset("Synthetic Deposit", 2_000_000, "2026-06-30", "deposit", source_note="synthetic contract", db_path=db_path)
|
||||
|
||||
Reference in New Issue
Block a user