mirror of https://github.com/scrapy/scrapy.git
remove_entities: added test for encoding argument
This commit is contained in:
parent
f2c2609e42
commit
d142489b81
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue