summaryrefslogtreecommitdiffstats
path: root/test/functional/swift_test_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/swift_test_client.py')
-rw-r--r--test/functional/swift_test_client.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/swift_test_client.py b/test/functional/swift_test_client.py
index 65a6824..daea902 100644
--- a/test/functional/swift_test_client.py
+++ b/test/functional/swift_test_client.py
@@ -170,7 +170,11 @@ class Connection(object):
self.storage_host = x[2].split(':')[0]
if ':' in x[2]:
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
@@ -462,8 +466,8 @@ class Container(Base):
raise ResponseError(self.conn.response)
def info(self, hdrs={}, parms={}, cfg={}):
- status = self.conn.make_request('HEAD', self.path, hdrs=hdrs,
- parms=parms, cfg=cfg)
+ self.conn.make_request('HEAD', self.path, hdrs=hdrs,
+ parms=parms, cfg=cfg)
if self.conn.response.status == 204:
fields = [['bytes_used', 'x-container-bytes-used'],