summaryrefslogtreecommitdiffstats
path: root/ipatests/test_ipalib/test_rpc.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-09-11 14:02:13 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-17 11:08:43 +0200
commitba5201979dfddcb4ca6bb1b68e786cb964e50bb6 (patch)
tree47b09b736a408be189a899340e07900bb9506c6a /ipatests/test_ipalib/test_rpc.py
parent23507e6124041ed17f39db211e802495e37520e7 (diff)
downloadfreeipa-ba5201979dfddcb4ca6bb1b68e786cb964e50bb6.tar.gz
freeipa-ba5201979dfddcb4ca6bb1b68e786cb964e50bb6.tar.xz
freeipa-ba5201979dfddcb4ca6bb1b68e786cb964e50bb6.zip
Use bytes instead of str where appropriate
Under Python 2, "str" and "bytes" are synonyms. Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipatests/test_ipalib/test_rpc.py')
-rw-r--r--ipatests/test_ipalib/test_rpc.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipatests/test_ipalib/test_rpc.py b/ipatests/test_ipalib/test_rpc.py
index 710d09832..31ed73cd5 100644
--- a/ipatests/test_ipalib/test_rpc.py
+++ b/ipatests/test_ipalib/test_rpc.py
@@ -67,8 +67,8 @@ def test_round_trip():
assert_equal(dump_n_load(unicode_str), unicode_str)
assert_equal(dump_n_load(Binary(binary_bytes)).data, binary_bytes)
assert isinstance(dump_n_load(Binary(binary_bytes)), Binary)
- assert type(dump_n_load('hello')) is str
- assert type(dump_n_load(u'hello')) is str
+ assert type(dump_n_load('hello')) is bytes
+ assert type(dump_n_load(u'hello')) is bytes
assert_equal(dump_n_load(''), '')
assert_equal(dump_n_load(u''), '')
assert dump_n_load(None) is None
@@ -81,7 +81,7 @@ def test_round_trip():
assert_equal(round_trip(utf8_bytes), utf8_bytes)
assert_equal(round_trip(unicode_str), unicode_str)
assert_equal(round_trip(binary_bytes), binary_bytes)
- assert type(round_trip('hello')) is str
+ assert type(round_trip('hello')) is bytes
assert type(round_trip(u'hello')) is unicode
assert_equal(round_trip(''), '')
assert_equal(round_trip(u''), u'')
@@ -116,13 +116,13 @@ def test_xml_unwrap():
assert f([]) == tuple()
assert f({}) == dict()
value = f(Binary(utf8_bytes))
- assert type(value) is str
+ assert type(value) is bytes
assert value == utf8_bytes
assert f(utf8_bytes) == unicode_str
assert f(unicode_str) == unicode_str
value = f([True, Binary('hello'), dict(one=1, two=utf8_bytes, three=None)])
assert value == (True, 'hello', dict(one=1, two=unicode_str, three=None))
- assert type(value[1]) is str
+ assert type(value[1]) is bytes
assert type(value[2]['two']) is unicode