コード例 #1
0
ファイル: edit_test.py プロジェクト: tantalor/emend
 def mock_content():
   return html.clean("pirate ninja robot “spam” should be “eggs”")
コード例 #2
0
ファイル: html_test.py プロジェクト: tantalor/emend
 def test_clean(self):
   """Strip all tags and decode html entities to unicode code points."""
   encoded = '<p>From the Latin <i>emendare</i>, &#x201c;to free from fault.&rdquo;</p>'
   decoded = u'From the Latin emendare, \u201cto free from fault.\u201d'
   self.assertEquals(clean(encoded), decoded)
コード例 #3
0
ファイル: edit_test.py プロジェクト: tantalor/emend
 def mock_content():
   return html.clean("pirate ninja robot &ldquo;ninja&rdquo; should be &ldquo;zombie&rdquo;")