remove_entities: added test for encoding argument

This commit is contained in:
Pablo Hoffman 2009-08-06 14:35:24 -03:00
parent f2c2609e42
commit d142489b81
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ class UtilsMarkupTest(unittest.TestCase):
# check browser hack for numeric character references in the 80-9F range
self.assertEqual(remove_entities('x™y', encoding='cp1252'), u'x\u2122y')
# encoding
self.assertEqual(remove_entities('x\x99™™y', encoding='cp1252'), \
u'x\u2122\u2122\u2122y')
def test_replace_tags(self):
# make sure it always return uncode
assert isinstance(replace_tags('no entities'), unicode)