summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorEric Day <eday@oddments.org>2010-10-26 23:53:55 +0000
committerTarmac <>2010-10-26 23:53:55 +0000
commiteb82a8a7d8220adf31db3afb46849f24924ec973 (patch)
tree15f3f24284c07e4e115f67b84c3bca2841d37189 /nova/tests
parentfd68eec1364a107c92453f753681ae5096451f39 (diff)
parentd8d12549a5e47c7c44f449f12d6b556e2c56483d (diff)
Fixes PEP8 violations from the last few merges.
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/test_api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/tests/api/openstack/test_api.py b/nova/tests/api/openstack/test_api.py
index a8c0ff9f8..dd83991b9 100644
--- a/nova/tests/api/openstack/test_api.py
+++ b/nova/tests/api/openstack/test_api.py
@@ -24,22 +24,28 @@ from nova.api.openstack import API
from nova.api.openstack import faults
from webob import Request
+
class APITest(unittest.TestCase):
def test_exceptions_are_converted_to_faults(self):
+
@webob.dec.wsgify
def succeed(req):
return 'Succeeded'
+
@webob.dec.wsgify
def raise_webob_exc(req):
raise webob.exc.HTTPNotFound(explanation='Raised a webob.exc')
+
@webob.dec.wsgify
def fail(req):
raise Exception("Threw an exception")
+
@webob.dec.wsgify
def raise_api_fault(req):
exc = webob.exc.HTTPNotFound(explanation='Raised a webob.exc')
return faults.Fault(exc)
+
api = API()
api.application = succeed