feat: fixes exception due to unread bytes in stream (#1897)
* feat: fixes exception due to unread bytes in stream * feat: additonal unit tests to cover changes * fix: automated changes by `make fix-import` * fix: additonal changes by `make fix-import` Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
This commit is contained in:
@@ -46,8 +46,8 @@ def test_custom_context(app):
|
||||
invalid = str(e)
|
||||
|
||||
j = loads(response.body)
|
||||
j['response_mw_valid'] = user
|
||||
j['response_mw_invalid'] = invalid
|
||||
j["response_mw_valid"] = user
|
||||
j["response_mw_invalid"] = invalid
|
||||
return json(j)
|
||||
|
||||
request, response = app.test_client.get("/")
|
||||
@@ -59,8 +59,7 @@ def test_custom_context(app):
|
||||
"has_missing": False,
|
||||
"invalid": "'types.SimpleNamespace' object has no attribute 'missing'",
|
||||
"response_mw_valid": "sanic",
|
||||
"response_mw_invalid":
|
||||
"'types.SimpleNamespace' object has no attribute 'missing'"
|
||||
"response_mw_invalid": "'types.SimpleNamespace' object has no attribute 'missing'",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user