Closed woutdenolf closed 1 year ago
For anyone else who has the same issue, you can make a quick fix by replacing
self.flask_test_client.cookie_jar.inject_wsgi(environ)
to
environ["HTTP_COOKIE"] = "; ".join(cookie._to_request_header() for cookie in self.flask_test_client.cookie_jar)
It does the same as the original werkzeug inject_wsgi: https://github.com/pallets/werkzeug/blob/6e2c1d15637bef6635545cbc8eaf0d161fad974a/src/werkzeug/test.py#L207-L215
This also uses hidden cookie functions, so it's not recommended :)
API change in Werkzeug 2.3: https://werkzeug.palletsprojects.com/en/2.3.x/changes/#version-2-3-0
Affected code in flask-socketio:
Flask handled the changes as follows: https://github.com/pallets/flask/pull/5053