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))
def test_normalize_utf8_withaccents(self): teststring = accent_file resstring = xml_util.normalize_utf8(teststring) self.assertTrue(teststring.decode('utf-8') == resstring, resstring)
def test_normalize_utf8_withaccents(self): teststring = accent_file resstring = xml_util.normalize_utf8(teststring) self.assertTrue(teststring.decode("utf-8") == resstring, resstring)
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))