Skip to content

Conversation

@stacywsmith
Copy link
Contributor

Fixes #426

pallets/werkzeug#2352 changed the default value of Response.autocorrect_location_header from True to False in Werkzeug >= 2.1.0.

tests/legacy/test_api_legacy.py::APITest::test_redirect depended upon Response.autocorrect_location_header being True.

Change test_redirect() to explicitly set Response.autocorrect_location_header to False, for backwards compatibility, and change the expected result for the test from an absolute URL to the relative URL.

Fixes python-restx#426

pallets/werkzeug#2352 changed the default value of Response.autocorrect_location_header from True to False in Werkzeug >= 2.1.0.

tests/legacy/test_api_legacy.py::APITest::test_redirect depended upon Response.autocorrect_location_header being True.

Change `test_redirect()` to explicitly set `Response.autocorrect_location_header` to `False`, for backwards compatibility, and change the expected result for the test from an absolute URL to the relative URL.
Copy link

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is used as a patch for https://build.opensuse.org/package/show/devel:languages:python:flask/python-flask-restx to allow building on rolling release Tumbleweed

@ziirish ziirish force-pushed the master branch 2 times, most recently from 0db7d06 to 4eaf373 Compare November 1, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change to Response.autocorrect_location_header in Werkzeug 2.1.0 causing test failure.

2 participants