Skip to content

Commit 5a2cc79

Browse files
committed
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWeb-Back into feat/edges-creation
2 parents e46f306 + d398bab commit 5a2cc79

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ werkzeug==3.1.2
6060
# flask
6161
# flask-cors
6262

63+
opengeodeweb-microservice==1.*,>=1.1.3

src/opengeodeweb_back/routes/create/blueprint_create.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
methods=schemas_dict["point_set"]["methods"],
2222
)
2323
def point_set() -> flask.Response:
24-
"""Endpoint to create a point set in 3D space."""
2524
json_data = utils_functions.validate_request(
2625
flask.request, schemas_dict["point_set"]
2726
)

tests/test_create_routes.py

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

5050

51+
def test_create_point_set_multiple(client: FlaskClient) -> None:
52+
"""Test the creation of a point set with multiple points."""
53+
route: str = "/opengeodeweb_back/create/point_set"
54+
data = {
55+
"name": "multiple_points",
56+
"points": [
57+
{"x": 1.0, "y": 2.0, "z": 3.0},
58+
{"x": 4.0, "y": 5.0, "z": 6.0},
59+
{"x": 7.0, "y": 8.0, "z": 9.0},
60+
],
61+
}
62+
response = client.post(route, json=data)
63+
assert response.status_code == 200
64+
65+
response_data = response.get_json()
66+
assert response_data["name"] == data["name"]
67+
assert response_data["geode_object_type"] == "PointSet3D"
68+
69+
5170
def test_create_point_with_invalid_data(client: FlaskClient) -> None:
5271
"""Test the point creation endpoint with invalid data."""
5372
route: str = "/opengeodeweb_back/create/point_set"

0 commit comments

Comments
 (0)