Skip to content

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

Open
@stacywsmith

Description

@stacywsmith

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions