Skip to content

Commit

Permalink
[DEV-3938] Upgrade werkzeug -> 2.1.1
Browse files Browse the repository at this point in the history
Backports spec-first#1506
  • Loading branch information
vmarkovtsev committed Apr 3, 2022
1 parent 6c4f4be commit da35afc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jsonschema==3.2.0
PyYAML==5.4.1
requests==2.27.1
inflection==0.5.1
werkzeug==1.0.1
werkzeug==2.1.1
packaging==20.9
swagger-ui-bundle==0.0.8
flask==1.1.2
Expand Down
8 changes: 6 additions & 2 deletions tests/api/test_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ def test_headers_jsonifier(simple_app):

response = app_client.post("/v1.0/goodday/dan", data={}) # type: flask.Response
assert response.status_code == 201
assert response.headers["Location"] == "http://localhost/my/uri"
# Default Werkzeug behavior was changed in 2.1
# https://github.com/pallets/werkzeug/issues/2352
assert response.headers["Location"] in ["http://localhost/my/uri", "/my/uri"]


def test_headers_produces(simple_app):
app_client = simple_app.app.test_client()

response = app_client.post("/v1.0/goodevening/dan", data={}) # type: flask.Response
assert response.status_code == 201
assert response.headers["Location"] == "http://localhost/my/uri"
# Default Werkzeug behavior was changed in 2.1
# https://github.com/pallets/werkzeug/issues/2352
assert response.headers["Location"] in ["http://localhost/my/uri", "/my/uri"]


def test_header_not_returned(simple_openapi_app):
Expand Down

0 comments on commit da35afc

Please sign in to comment.