Fix add_middleware enum comparison (#1698)

Fixes #1697

Because of a wrong comparison against the position `Enum`, middleware
was not actually being added to the stack via `add_middleware`. This PR
fixes this, adds a warning when the middleware position cannot be found,
and adds a test.
This commit is contained in:
Robbe Sneyders
2023-04-24 18:09:57 +02:00
committed by GitHub
parent 128a8e073f
commit 15fe2eda8f
3 changed files with 46 additions and 11 deletions

View File

@@ -1,8 +1,3 @@
import json
import flask
def fix_data(data):
return data.replace(b'\\"', b'"')