Merge remote-tracking branch 'origin/dev' into sub_laptop_1
This commit is contained in:
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user