diff options
Diffstat (limited to 'tests/test_soup.py')
-rw-r--r-- | tests/test_soup.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_soup.py b/tests/test_soup.py index c3a19e1..01dff53 100644 --- a/tests/test_soup.py +++ b/tests/test_soup.py @@ -19,10 +19,16 @@ class TestSelectiveParsing(SoupTest): class TestUnicodeDammit(unittest.TestCase): """Standalone tests of Unicode, Dammit.""" - def test_smart_quotes_to_xml_entities(self): + def test_smart_quotes_to_unicode(self): markup = "<foo>\x91\x92\x93\x94</foo>" dammit = UnicodeDammit(markup) self.assertEquals( + dammit.unicode, u"<foo>\u2018\u2019\u201c\u201d</foo>") + + def test_smart_quotes_to_xml_entities(self): + markup = "<foo>\x91\x92\x93\x94</foo>" + dammit = UnicodeDammit(markup, smart_quotes_to="xml") + self.assertEquals( dammit.unicode, "<foo>‘’“”</foo>") def test_smart_quotes_to_html_entities(self): |