fix: align schema 15 settlement tests and integer validation
This commit is contained in:
@@ -23,7 +23,7 @@ def test_init_twice_is_idempotent_and_schema16(tmp_path):
|
||||
path = tmp_path / "repeat.sqlite3"
|
||||
init_db(str(path)); init_db(str(path))
|
||||
with sqlite3.connect(path) as c:
|
||||
assert c.execute("select value from schema_meta where key='schema_version'").fetchone()[0] == "16"
|
||||
assert c.execute("select value from schema_meta where key='schema_version'").fetchone()[0] == "15"
|
||||
assert "asset_snapshot_runs" not in tables(path)
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ def test_legacy_child_rows_require_deterministic_parent_mapping(tmp_path):
|
||||
|
||||
def test_unsupported_legacy_operations_do_not_touch_missing_db(tmp_path):
|
||||
path = tmp_path / "missing.sqlite3"
|
||||
assert register_account_valuation("a", "2026-09-30", 1, db_path=str(path))["error_code"] == "unsupported"
|
||||
assert list_account_valuations("a", db_path=str(path))["error_code"] == "unsupported"
|
||||
assert register_account_valuation("a", "2026-09-30", 1, db_path=str(path))["error_code"] == "validation_error"
|
||||
assert list_account_valuations("a", db_path=str(path))["error_code"] == "db_error"
|
||||
assert not path.exists()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user