diff options
author | Chuck Short <chuck.short@canonical.com> | 2013-05-01 13:07:44 -0500 |
---|---|---|
committer | Chuck Short <chuck.short@canonical.com> | 2013-05-07 11:55:56 -0500 |
commit | 63f6487e9a321dc9f89d6f71a922fcdd03b25589 (patch) | |
tree | fc9c91bd3162525867aeff7ba3a1b88ca8c55e82 /tests/unit/rpc | |
parent | 4c69cbd8857947906e88791823cf3e9e9e5fa86a (diff) | |
download | oslo-63f6487e9a321dc9f89d6f71a922fcdd03b25589.tar.gz oslo-63f6487e9a321dc9f89d6f71a922fcdd03b25589.tar.xz oslo-63f6487e9a321dc9f89d6f71a922fcdd03b25589.zip |
Convert unicode strings for python3 portability
From http://docs.python.org/3.1/whatsnew/3.0.html
You can no longer use u"..." literals for Unicode text.
However, you must use b"..." literals for binary data. Use
python-six to make this migration easier.
Change-Id: I95166a07f4edf33be55a4bdf2674c2f238a06f19
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'tests/unit/rpc')
-rw-r--r-- | tests/unit/rpc/test_common.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/rpc/test_common.py b/tests/unit/rpc/test_common.py index 2248a8f..bec8546 100644 --- a/tests/unit/rpc/test_common.py +++ b/tests/unit/rpc/test_common.py @@ -150,15 +150,15 @@ class RpcCommonTestCase(test_utils.BaseTestCase): 'class': 'FakeUserDefinedException', 'module': self.__class__.__module__, 'tb': ['raise FakeUserDefinedException'], - 'args': (u'fakearg',), - 'kwargs': {u'fakekwarg': u'fake'}, + 'args': ('fakearg',), + 'kwargs': {'fakekwarg': 'fake'}, } serialized = jsonutils.dumps(failure) after_exc = rpc_common.deserialize_remote_exception(FLAGS, serialized) self.assertTrue(isinstance(after_exc, FakeUserDefinedException)) - self.assertEqual(after_exc.args, (u'fakearg',)) - self.assertEqual(after_exc.kwargs, {u'fakekwarg': u'fake'}) + self.assertEqual(after_exc.args, ('fakearg',)) + self.assertEqual(after_exc.kwargs, {'fakekwarg': 'fake'}) def test_deserialize_remote_exception_cannot_recreate(self): """Ensure a RemoteError is returned on initialization failure. |