Fix compatibility with Swift Stein
Change-Id: I033129cb508ef4b287ef1ae6f9f2a5ed4fdac25d
This commit is contained in:
parent
0c8eaf50a9
commit
55e5b5278b
|
@ -44,6 +44,7 @@ from swift.common.swob import HTTPNotFound
|
|||
from swift.common.swob import HTTPUnauthorized
|
||||
from swift.common.swob import Request
|
||||
from swift.common.swob import Response
|
||||
from swift.common.swob import wsgi_quote
|
||||
|
||||
from swift.common.bufferedhttp import http_connect_raw as http_connect
|
||||
from swift.common.middleware.acl import clean_acl
|
||||
|
@ -195,8 +196,8 @@ class Swauth(object):
|
|||
else:
|
||||
headers = {'X-Storage-Policy': sp}
|
||||
subreq = swift.common.wsgi.make_pre_authed_request(
|
||||
env, method=method, path=path, body=body, headers=headers,
|
||||
agent=self.agent)
|
||||
env, method=method, path=wsgi_quote(path), body=body,
|
||||
headers=headers, agent=self.agent)
|
||||
subreq.environ['swift.source'] = self.swift_source
|
||||
return subreq
|
||||
|
||||
|
|
|
@ -663,7 +663,7 @@ class TestAuth(unittest.TestCase):
|
|||
headers={'X-Auth-User': 'act:usr',
|
||||
'X-Auth-Key': 'key'}).get_response(self.test_auth)
|
||||
self.assertEqual(resp.status_int, 500)
|
||||
self.assertEqual(self.test_auth.app.calls, 1)
|
||||
self.assertEqual(self.test_auth.app.calls, 2)
|
||||
|
||||
def test_get_token_fail_get_account(self):
|
||||
self.test_auth.app = FakeApp(iter([
|
||||
|
|
Loading…
Reference in New Issue