Fix functional tests with keystone.

- Make sure storage_url is string and not unicode or the unicode
  no_safe_quote test will not get this nicely.
- Fixes bug 1190190.

Change-Id: I945f2b94f2063b836c10131fa4bd57938ed48f3c
This commit is contained in:
Chmouel Boudjnah 2013-06-12 13:10:08 +02:00
parent 5bfd2d798d
commit 752647a2e1

View File

@ -155,7 +155,11 @@ class Connection(object):
self.storage_host = x[2].split(':')[0] self.storage_host = x[2].split(':')[0]
if ':' in x[2]: if ':' in x[2]:
self.storage_port = int(x[2].split(':')[1]) self.storage_port = int(x[2].split(':')[1])
self.storage_url = '/%s/%s' % (x[3], x[4]) # Make sure storage_url is a string and not unicode, since
# keystoneclient (called by swiftclient) returns them in
# unicode and this would cause troubles when doing
# no_safe_quote query.
self.storage_url = str('/%s/%s' % (x[3], x[4]))
self.storage_token = storage_token self.storage_token = storage_token