Use six.u instead of u''

There's no u'' in python3.4, strings are always unicode or bytes in
python3. use six.u() to convert strings.

Change-Id: I96be4305476ea74b4a2931fab550e8c21f1c8fad
This commit is contained in:
Yang Hongyang 2016-03-03 10:47:21 +08:00
parent d29e4a1825
commit df08393491

View File

@ -181,7 +181,11 @@ class FormatLabelsTest(test_utils.BaseTestCase):
class CliUtilsTest(test_utils.BaseTestCase):
def test_keys_and_vals_to_strs(self):
dict_in = {u'a': u'1', u'b': {u'x': 1, 'y': u'2', u'z': u'3'}, 'c': 7}
dict_in = {six.u('a'): six.u('1'),
six.u('b'): {six.u('x'): 1,
'y': six.u('2'),
six.u('z'): six.u('3')},
'c': 7}
dict_exp = collections.OrderedDict(
{'a': '1',