forked from p15670423/monkey
Island: Respond with 422 instead of 404 from POST /api/island-mode
This commit is contained in:
parent
9310463f44
commit
c56ca37bc0
|
@ -21,4 +21,4 @@ class IslandMode(flask_restful.Resource):
|
|||
set_mode(mode)
|
||||
return make_response({}, 200)
|
||||
except ValueError:
|
||||
return make_response({}, 404)
|
||||
return make_response({}, 422)
|
||||
|
|
|
@ -21,7 +21,7 @@ def test_island_mode_post__invalid_mode(flask_client):
|
|||
resp = flask_client.post(
|
||||
"/api/island-mode", data=json.dumps({"mode": "bogus mode"}), follow_redirects=True
|
||||
)
|
||||
assert resp.status_code == 404
|
||||
assert resp.status_code == 422
|
||||
|
||||
|
||||
def test_island_mode_post__set_model(flask_client, uses_database):
|
||||
|
|
Loading…
Reference in New Issue