def mock_content(): return html.clean("pirate ninja robot “spam” should be “eggs”")
def test_clean(self): """Strip all tags and decode html entities to unicode code points.""" encoded = '<p>From the Latin <i>emendare</i>, “to free from fault.”</p>' decoded = u'From the Latin emendare, \u201cto free from fault.\u201d' self.assertEquals(clean(encoded), decoded)
def mock_content(): return html.clean("pirate ninja robot “ninja” should be “zombie”")