Fix compatibility with Swift Stein

Change-Id: I033129cb508ef4b287ef1ae6f9f2a5ed4fdac25d
This commit is contained in:
Ondřej Nový 2019-07-15 14:36:05 -03:00
parent 0c8eaf50a9
commit f6486a2a3b
3 changed files with 4 additions and 4 deletions

View File

@ -195,8 +195,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

View File

@ -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([

View File

@ -13,7 +13,7 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_COVER_ERASE=1
deps =
-r{toxinidir}/test-requirements.txt
https://tarballs.openstack.org/swift/swift-2.15.1.tar.gz
https://tarballs.openstack.org/swift/swift-2.21.0.tar.gz
commands = nosetests {posargs:test/unit}
[testenv:cover]