summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2016-01-26 15:32:29 +0100
committerJan Cholasta <jcholast@redhat.com>2016-02-17 10:41:29 +0100
commitc3529355a63dc5a005f1ca8f59e020bafb9aa49f (patch)
tree57fa3c23cdea50bbfc96e4a9637f85afcfc8244a
parent4b104c742b6fcf68671e4f81968973680858950f (diff)
downloadfreeipa-c3529355a63dc5a005f1ca8f59e020bafb9aa49f.tar.gz
freeipa-c3529355a63dc5a005f1ca8f59e020bafb9aa49f.tar.xz
freeipa-c3529355a63dc5a005f1ca8f59e020bafb9aa49f.zip
test_util: str/bytes check fixes for Python 3
https://fedorahosted.org/freeipa/ticket/5638 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r--ipatests/test_util.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipatests/test_util.py b/ipatests/test_util.py
index 5d3328015..85b2843ac 100644
--- a/ipatests/test_util.py
+++ b/ipatests/test_util.py
@@ -158,9 +158,9 @@ def test_assert_deepequal():
'foo', u'hello', u'world', tuple()
)
- e = raises(AssertionError, f, 'hello', u'hello', 'foo')
+ e = raises(AssertionError, f, b'hello', u'hello', 'foo')
assert str(e) == TYPE % (
- 'foo', str, unicode, 'hello', u'hello', tuple()
+ 'foo', bytes, unicode, b'hello', u'hello', tuple()
)
e = raises(AssertionError, f, 18, 18.0, 'foo')
@@ -183,7 +183,7 @@ def test_assert_deepequal():
# Test with bad compound values:
b = [
- 'hello',
+ b'hello',
dict(naughty=u'nurse'),
18,
]
@@ -194,12 +194,12 @@ def test_assert_deepequal():
b = [
u'hello',
- dict(naughty='nurse'),
+ dict(naughty=b'nurse'),
18,
]
e = raises(AssertionError, f, a, b, 'foo')
assert str(e) == TYPE % (
- 'foo', unicode, str, u'nurse', 'nurse', (1, 'naughty')
+ 'foo', unicode, bytes, u'nurse', b'nurse', (1, 'naughty')
)
b = [
@@ -209,7 +209,7 @@ def test_assert_deepequal():
]
e = raises(AssertionError, f, a, b, 'foo')
assert str(e) == TYPE % (
- b'foo', int, float, 18, 18.0, (0 if six.PY2 else 2,)
+ 'foo', int, float, 18, 18.0, (0 if six.PY2 else 2,)
)
# List length mismatch