Merge "Fix 401 status response"

This commit is contained in:
Jenkins 2013-04-08 20:49:27 +00:00 committed by Gerrit Code Review
commit 89d3500441
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ class SecurityError(Error):
class Unauthorized(SecurityError):
"""The request you have made requires authentication."""
code = 401
title = 'Not Authorized'
title = 'Unauthorized'
class AuthPluginException(Unauthorized):

View File

@ -159,7 +159,7 @@ class S3TokenMiddlewareTestBad(S3TokenMiddlewareTestBase):
ret = {"error":
{"message": "EC2 access key not found.",
"code": 401,
"title": "Not Authorized"}}
"title": "Unauthorized"}}
body = jsonutils.dumps(ret)
self.status = 403
self.resp = FakeHTTPResponse(self.status, body)