diff --git a/barbican/api/hooks.py b/barbican/api/hooks.py index fcb314465..5b502e898 100644 --- a/barbican/api/hooks.py +++ b/barbican/api/hooks.py @@ -29,7 +29,7 @@ from barbican.model import repositories class JSONErrorHook(pecan.hooks.PecanHook): def on_error(self, state, exc): if isinstance(exc, webob.exc.HTTPError): - exc.body = jsonutils.dumps({ + exc.body = jsonutils.dump_as_bytes({ 'code': exc.status_int, 'title': exc.title, 'description': exc.detail diff --git a/tox.ini b/tox.ini index 29d1fd4d8..a203d6842 100644 --- a/tox.ini +++ b/tox.ini @@ -29,6 +29,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen commands = /usr/bin/find . -type f -name "*.pyc" -delete python -m testtools.run \ + barbican.tests.api.controllers.test_cas \ barbican.tests.api.controllers.test_versions \ barbican.tests.api.middleware.test_context \ barbican.tests.api.middleware.test_simple \