From 0d36d2bf9eba28123c172fd24780f0ebe95db10a Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Tue, 1 Nov 2011 14:47:51 +0000 Subject: Speed up tests a further 35 seconds This changes more OSAPI tests to using their Controller directly, bypassing the slow wsgi setup process. Change-Id: Ic014c32786cb10c541f7d367573adb7a069c1a88 --- nova/api/openstack/contrib/quotas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/openstack/contrib/quotas.py b/nova/api/openstack/contrib/quotas.py index 83d75394a..184b4d12f 100644 --- a/nova/api/openstack/contrib/quotas.py +++ b/nova/api/openstack/contrib/quotas.py @@ -49,7 +49,7 @@ class QuotaSetsController(object): return self._format_quota_set(id, quota.get_project_quotas(context, id)) except exception.NotAuthorized: - return webob.Response(status_int=403) + raise webob.exc.HTTPForbidden() def update(self, req, id, body): context = req.environ['nova.context'] @@ -65,7 +65,7 @@ class QuotaSetsController(object): except exception.ProjectQuotaNotFound: db.quota_create(context, project_id, key, value) except exception.AdminRequired: - return webob.Response(status_int=403) + raise webob.exc.HTTPForbidden() return {'quota_set': quota.get_project_quotas(context, project_id)} def defaults(self, req, id): -- cgit