feat(562-2): D03 노선 정본 GET · PUT 응답에 year_start(사업연도 시작) — 조각 연도 고름 처음 값

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 20:15:06 +09:00
co-authored by Claude Opus 5.5
parent dd86e12d83
commit 0c78438cb1
2 changed files with 13 additions and 4 deletions
+2 -1
View File
@@ -214,12 +214,13 @@ def test_get_saved_legacy_or_empty(client) -> None:
client.db.answers["FROM plan_networks"] = [{"network_json": json.dumps(_network())}]
got = client.get(URL).json()
assert got["legacy"] is False and len(got["derived"]["pieces"]) == 3
assert got["base"]["end"] == {"x": 90.0, "y": 180.0}
assert got["base"]["end"] == {"x": 90.0, "y": 180.0} and got["year_start"] == 2026
def test_put_stores_network_pieces_years(client) -> None:
got = client.put(URL, json=_network())
assert got.status_code == 200 and got.json()["derived"]["pieces"][1]["from_m"] == 75.0
assert got.json()["year_start"] == 2026
log = client.db.log
assert log[-1][0] == "COMMIT"
pieces = [a for s, a in log if s.startswith("INSERT INTO plan_route_pieces")]