wtforms / flask-wtf

Simple integration of Flask and WTForms, including CSRF, file upload and Recaptcha integration.
https://flask-wtf.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.46k stars 310 forks source link

Fix failing test with Flask 2.2 #533

Closed anthonyroussel closed 1 year ago

anthonyroussel commented 2 years ago

Fixes:

Compiling flask-wtf with the current version of flask v2.2.2 breaks the test suite. The faulty test is test_set_default_message_language.

Looks like it is caused by a change in Flask 2.2:

A resolution is to move the client.post code in the test after the controller code.

Works & tested with Flask 2.1 & 2.2.

Checklist:

davidism commented 2 years ago

The changelog isn't needed, it doesn't describe a user-facing change.

anthonyroussel commented 2 years ago

The changelog isn't needed, it doesn't describe a user-facing change.

Thanks for the review.

I removed the line I had added in the changelog.

azmeuk commented 1 year ago

I pushed the same patch on the repository. Sorry I did not see this one before.