Merge remote-tracking branch 'origin/dev' into sub_laptop_1

This commit is contained in:
2026-10-27 20:16:19 +09:00
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")]