def test_encode(self): xml = "What’s New" python = u"What\u2019s New" self.assertEqual(decode_xml_char_reference(xml), python)