Skip to content
Snippets Groups Projects
Commit 35d5208e0168 authored by Arnaud Vergnet's avatar Arnaud Vergnet :sun_with_face:
Browse files

test: add binary route test for no params

parent 61308d1e3099
No related branches found
No related tags found
1 merge request!62tests: improve coverage
......@@ -116,6 +116,30 @@
)
assert response.body == b""
def test_no_params_sent(self):
response = self.webapp.get(
self.get_api_path("binary"),
headers=self.custom_headers,
status=400,
).json
assert response == {
"data": [
{
"exception": "MissingRequiredParameter",
"field": "eid",
"message": "Missing required parameter: eid",
},
{
"exception": "MissingRequiredParameter",
"field": "attribute",
"message": "Missing required parameter: attribute",
},
],
"message": "Your request could not be validated against the openapi "
"specification.",
"title": "OpenApiValidationError",
}
def test_missing_custom_headers_returns_400(self):
response = self.webapp.get(
self.get_api_path("binary"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment