[openstack-dev] Follow-up on Internal client unicode

Pete Zaitcev zaitcev at redhat.com
Tue Oct 9 17:32:25 UTC 2012


Hi, Greg:

What do you think about this:

commit 8033ca0483330e89526d3b24a0a681f45b47d7bd
Author: Pete Zaitcev <zaitcev at kotori.zaitcev.us>
Date:   Tue Oct 9 11:23:40 2012 -0600

    Update to Greg Lange's internal client unicode thing.

diff --git a/test/unit/common/test_internal_client.py b/test/unit/common/test_internal_client.py
index 1752304..3b5d673 100644
--- a/test/unit/common/test_internal_client.py
+++ b/test/unit/common/test_internal_client.py
@@ -31,9 +31,10 @@ def unicode_string(start, length):
 
 
 def path_parts():
-    account = unicode_string(1000, 4) + ' ' + unicode_string(1000, 4)
-    container = unicode_string(1000, 4) + ' ' + unicode_string(1000, 4)
-    obj = unicode_string(1000, 4) + ' ' + unicode_string(1000, 4)
+    us = unicode_string(1000, 4)
+    account = 'a' + us + ' ' + us
+    container = 'c' + us + ' ' + us
+    obj = 'o' + us + ' ' + us 
     return account, container, obj
 
 
The objective is to restore the test coverage against copy-paste
errors that was there before the unicode support. If you like
this, I'll throw it into Gerrit.

-- Pete



More information about the OpenStack-dev mailing list