summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-20 15:55:33 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-20 15:55:33 -0400
commita418f3a21f301dccef6a71a63f7cb6a7f5f4fe8f (patch)
tree953b8696479d87f2339a15cf639f3a4599188de0 /testsuite
parent91ad257efa9dd1a0a0db5f68500621529bf02179 (diff)
downloadbcfg2-a418f3a21f301dccef6a71a63f7cb6a7f5f4fe8f.tar.gz
bcfg2-a418f3a21f301dccef6a71a63f7cb6a7f5f4fe8f.tar.bz2
bcfg2-a418f3a21f301dccef6a71a63f7cb6a7f5f4fe8f.zip
fixed some unicode stuff in POSIXFile tests
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
index c99176fb9..34784dc3d 100644
--- a/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
+++ b/testsuite/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py
@@ -41,7 +41,7 @@ class TestPOSIXFile(TestPOSIXTool):
'utf_8'))
self.assertFalse(ptool._is_string("foo" + chr(128) + "bar",
'ascii'))
- ustr = '\xef\xa3\x91 + \xef\xa3\x92'
+ ustr = 'é'
self.assertTrue(ptool._is_string(ustr, 'utf_8'))
self.assertFalse(ptool._is_string(ustr, 'ascii'))
@@ -63,7 +63,7 @@ class TestPOSIXFile(TestPOSIXTool):
entry.text = "test"
self.assertEqual(ptool._get_data(entry), ("test", False))
- ustr = u'\uf8d1 + \uf8d2'
+ ustr = u'é'
entry = copy.deepcopy(orig_entry)
entry.text = ustr
self.assertEqual(ptool._get_data(entry), (ustr, False))
@@ -72,8 +72,7 @@ class TestPOSIXFile(TestPOSIXTool):
ptool = self.get_obj(posix=get_posix_object(setup=setup))
entry = copy.deepcopy(orig_entry)
entry.text = ustr
- self.assertEqual(ptool._get_data(entry),
- ('\xef\xa3\x91 + \xef\xa3\x92', False))
+ self.assertEqual(ptool._get_data(entry), (ustr, False))
@patch("__builtin__.open")
@patch("Bcfg2.Client.Tools.POSIX.base.POSIXTool.verify")