Skip to content

Commit c2e4131

Browse files
committed
add test for multiple points
1 parent 024840c commit c2e4131

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/test_create_routes.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,25 @@ def test_create_point(client: FlaskClient, point_data: test_utils.JsonData) -> N
3939
test_utils.test_route_wrong_params(client, route, lambda: copy.deepcopy(point_data))
4040

4141

42+
def test_create_point_set_multiple(client: FlaskClient) -> None:
43+
"""Test the creation of a point set with multiple points."""
44+
route: str = "/opengeodeweb_back/create/point_set"
45+
data = {
46+
"name": "multiple_points",
47+
"points": [
48+
{"x": 1.0, "y": 2.0, "z": 3.0},
49+
{"x": 4.0, "y": 5.0, "z": 6.0},
50+
{"x": 7.0, "y": 8.0, "z": 9.0},
51+
],
52+
}
53+
response = client.post(route, json=data)
54+
assert response.status_code == 200
55+
56+
response_data = response.get_json()
57+
assert response_data["name"] == data["name"]
58+
assert response_data["geode_object_type"] == "PointSet3D"
59+
60+
4261
def test_create_point_with_invalid_data(client: FlaskClient) -> None:
4362
"""Test the point creation endpoint with invalid data."""
4463
route: str = "/opengeodeweb_back/create/point_set"

0 commit comments

Comments
 (0)