summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLenka Doudova <ldoudova@redhat.com>2016-06-20 10:29:26 +0200
committerMartin Basti <mbasti@redhat.com>2016-06-29 16:45:13 +0200
commitf37c3af0db225538157f899d04a041af5addfa01 (patch)
tree12056fc7877010f09f5c760cc470c9df55581db2
parent31a13c9e9849eca794aa7908bc252185c4b36678 (diff)
downloadfreeipa-f37c3af0db225538157f899d04a041af5addfa01.tar.gz
freeipa-f37c3af0db225538157f899d04a041af5addfa01.tar.xz
freeipa-f37c3af0db225538157f899d04a041af5addfa01.zip
Tests: Fix failing ipatests/test_ipalib/test_errors.py
Some strings in the testsuite are unicode which wasn't reflected in the tests. This patch fixes the problem by changing concerned strings to unicode. Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
-rw-r--r--ipatests/test_ipalib/test_errors.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipatests/test_ipalib/test_errors.py b/ipatests/test_ipalib/test_errors.py
index 7ad07b041..8bf2cba45 100644
--- a/ipatests/test_ipalib/test_errors.py
+++ b/ipatests/test_ipalib/test_errors.py
@@ -244,8 +244,8 @@ class test_PublicError(PublicExceptionTester):
message = u'The translated, interpolated message'
format = 'key=%(key1)r and key2=%(key2)r'
uformat = u'Translated key=%(key1)r and key2=%(key2)r'
- val1 = 'Value 1'
- val2 = 'Value 2'
+ val1 = u'Value 1'
+ val2 = u'Value 2'
kw = dict(key1=val1, key2=val2)
# Test with format=str, message=None
@@ -304,7 +304,7 @@ class test_PublicError(PublicExceptionTester):
format = '%(true)r %(text)r %(number)r'
uformat = u'Translated %(true)r %(text)r %(number)r'
- kw = dict(true=True, text='Hello!', number=18)
+ kw = dict(true=True, text=u'Hello!', number=18)
# Test with format=str, message=None
e = raises(ValueError, subclass, format, **kw)
@@ -342,7 +342,7 @@ class test_PublicError(PublicExceptionTester):
'$')
inst = subclass(instructions=instructions, **kw)
assert inst.format is subclass.format
- assert_equal(inst.instructions, instructions)
+ assert_equal(inst.instructions, unicode(instructions))
inst_match = regexp.match(inst.strerror).groups()
assert_equal(list(inst_match),list(instructions))