def test_unescape_additional_entities(self): expected = '<hello>T\'was a dark & "stormy" night</hello>' input = '<hello>T'was a dark & "stormy" night</hello>' self.assertEquals(expected, codec_xml.unescape(input, {' ': ' '}))
def test_unescape_override_entities(self): expected = '<hello>T\'was a dark & "stormy" night</hello>' input = '<hello>T&blah;was a dark & "stormy" night</hello>' self.assertEquals(expected, codec_xml.unescape(input, {"&blah;": "'"}))
def test_unescape(self): expected = '<hello>T\'was a dark & "stormy" night</hello>' input = '<hello>T'was a dark & "stormy" night</hello>' self.assertEquals(expected, codec_xml.unescape(input))