Exemplo n.º 1
0
 def test_normalize_utf8_unicodestring(self):
     # this is a UNICODE string consisting of the characters supported by unicode
     teststring_normal = unicode(
         """!@#$%^&*()_+-=QWERTYqwerty<>,.:";'?/{}[]|\\""")
     resstring = xml_util.normalize_utf8(teststring_normal)
     self.assertTrue(teststring_normal == resstring, \
         "{0}\nshould be\n{1}".format(resstring, teststring_normal))
Exemplo n.º 2
0
 def test_normalize_utf8_withaccents(self):
     teststring = accent_file
     resstring = xml_util.normalize_utf8(teststring)
     self.assertTrue(teststring.decode('utf-8') == resstring, resstring)
Exemplo n.º 3
0
 def test_normalize_utf8_withaccents(self):
     teststring = accent_file
     resstring = xml_util.normalize_utf8(teststring)
     self.assertTrue(teststring.decode("utf-8") == resstring, resstring)
Exemplo n.º 4
0
 def test_normalize_utf8_unicodestring(self):
     # this is a UNICODE string consisting of the characters supported by unicode
     teststring_normal = unicode("""!@#$%^&*()_+-=QWERTYqwerty<>,.:";'?/{}[]|\\""")
     resstring = xml_util.normalize_utf8(teststring_normal)
     self.assertTrue(teststring_normal == resstring, "{0}\nshould be\n{1}".format(resstring, teststring_normal))