feat: add node coverage and improve investigation presentation
Generic Container CI/CD / test-build-publish (push) Failing after 1m50s
Server CI/CD v2 / build-test-publish-and-deploy (push) Failing after 1m51s

This commit is contained in:
2026-11-02 15:23:34 +08:00
parent 05183aff93
commit f2cfce8192
25 changed files with 588 additions and 21 deletions
+14
View File
@@ -1,4 +1,18 @@
from app.native.wndb.gis import network_views, region_geometry
def test_selected_node_positions_use_bound_project_and_parameterized_geometry_query(monkeypatch):
calls = []
def read_all(network, statement, parameters):
calls.append((network, statement, parameters))
return [{"id": "A", "longitude": 117.24, "latitude": 32.75}]
monkeypatch.setattr(network_views, "read_all", read_all)
assert network_views.get_node_geographic_positions("project-a", []) == []
assert network_views.get_node_geographic_positions("project-a", ["A"])[0]["id"] == "A"
assert len(calls) == 1 and calls[0][0] == "project-a" and calls[0][2] == (["A"],)
assert "ST_Transform(geom,4326)" in calls[0][1] and "node_id = ANY(%s)" in calls[0][1]
from app.native.wndb.model import elements