Fix py35 func tests
A change in webob is causing some failures. A charset must now be specified in the webob response object. Change-Id: I84135b8b3cf9552e185a265b9e51548b5d72b15f
This commit is contained in:
parent
28f3a61383
commit
24bc9dd214
@ -127,6 +127,7 @@ class JSONErrorHook(pecan.hooks.PecanHook):
|
||||
'title': exc.title,
|
||||
'detail': exc.detail}),
|
||||
status=exc.status_int,
|
||||
charset='UTF-8',
|
||||
content_type='application/json'
|
||||
)
|
||||
title = None
|
||||
@ -149,6 +150,7 @@ class JSONErrorHook(pecan.hooks.PecanHook):
|
||||
return webob.Response(
|
||||
body=json.dumps(body),
|
||||
status=status_code,
|
||||
charset='UTF-8',
|
||||
content_type='application/json'
|
||||
)
|
||||
|
||||
|
@ -49,6 +49,7 @@ class JSONErrorHookTestCase(base.BaseTestCase):
|
||||
self.assertEqual(
|
||||
dict(body=expected_body,
|
||||
status=expected_status_code,
|
||||
charset='UTF-8',
|
||||
content_type='application/json'),
|
||||
get_response_kwargs(response)
|
||||
)
|
||||
|
@ -12,4 +12,4 @@ requests>=2.2.0,!=2.4.0
|
||||
requests-cache>=0.4.9
|
||||
jsonschema>=2.0.0,<3.0.0
|
||||
PyJWT>=1.0.1 # MIT
|
||||
WebOb>=1.6.0 # MIT
|
||||
WebOb>=1.7.1 # MIT
|
||||
|
Loading…
x
Reference in New Issue
Block a user