From 752647a2e1a71475a3b725157e694a3d3157f29c Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Wed, 12 Jun 2013 13:10:08 +0200 Subject: [PATCH] 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 --- test/functional/swift_test_client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/functional/swift_test_client.py b/test/functional/swift_test_client.py index 12894f7ce3..3c9802e1b9 100644 --- a/test/functional/swift_test_client.py +++ b/test/functional/swift_test_client.py @@ -155,7 +155,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