Python3: fix barbican.tests.api.controllers.test_cas
In Python 3, Response.body must be set to bytes. Partially implements: blueprint barbican-py3 Change-Id: I913d55bea89788b9ca4ad83fec8d96dc9ccd073c
This commit is contained in:
parent
47d87754ec
commit
eaf542c163
@ -29,7 +29,7 @@ from barbican.model import repositories
|
|||||||
class JSONErrorHook(pecan.hooks.PecanHook):
|
class JSONErrorHook(pecan.hooks.PecanHook):
|
||||||
def on_error(self, state, exc):
|
def on_error(self, state, exc):
|
||||||
if isinstance(exc, webob.exc.HTTPError):
|
if isinstance(exc, webob.exc.HTTPError):
|
||||||
exc.body = jsonutils.dumps({
|
exc.body = jsonutils.dump_as_bytes({
|
||||||
'code': exc.status_int,
|
'code': exc.status_int,
|
||||||
'title': exc.title,
|
'title': exc.title,
|
||||||
'description': exc.detail
|
'description': exc.detail
|
||||||
|
1
tox.ini
1
tox.ini
@ -29,6 +29,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
|||||||
commands =
|
commands =
|
||||||
/usr/bin/find . -type f -name "*.pyc" -delete
|
/usr/bin/find . -type f -name "*.pyc" -delete
|
||||||
python -m testtools.run \
|
python -m testtools.run \
|
||||||
|
barbican.tests.api.controllers.test_cas \
|
||||||
barbican.tests.api.controllers.test_versions \
|
barbican.tests.api.controllers.test_versions \
|
||||||
barbican.tests.api.middleware.test_context \
|
barbican.tests.api.middleware.test_context \
|
||||||
barbican.tests.api.middleware.test_simple \
|
barbican.tests.api.middleware.test_simple \
|
||||||
|
Loading…
Reference in New Issue
Block a user