flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

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

Open stacywsmith opened this issue 2 years ago • 0 comments

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 currently depends upon Response.autocorrect_location_header being True.

Repro Steps (if applicable)

  1. With Werkzeug >= 2.1.0 installed
  2. inv test

Expected Behavior

Tests should pass.

Actual Behavior

tests/legacy/test_api_legacy.py::APITest::test_redirect fails with:

========================================================= short test summary info ==========================================================
FAILED tests/legacy/test_api_legacy.py::APITest::test_redirect - AssertionError: assert '/' == 'http://localhost/'

Environment

  • Python version: CPython 3.8.12
  • Flask version: 2.1.0
  • Flask-RESTX version: 0.5.1
  • Other installed Flask extensions: N/A
  • Werkzeaug: 2.1.0

stacywsmith avatar Apr 02 '22 14:04 stacywsmith