summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-02-22 12:25:42 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-02-22 12:25:42 -0500
commit1f4d0856119ee0b06ea607830b8c630bc08bd557 (patch)
treed8b6125dfb43eed312844d8f18b474f9298c114b /bs4/testing.py
parent55fed485ac9280c2509b418f8d1a8c140d5ec822 (diff)
Bare strings are not HTML-escaped by default, but tags are.
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index b82a640..49f50a5 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -227,10 +227,9 @@ class HTMLTreeBuilderSmokeTest(object):
def test_entities_converted_on_the_way_out(self):
text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
- expected = u"&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;".encode("utf-8")
+ expected = u"<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>".encode("utf-8")
soup = self.soup(text)
- str = soup.p.string
- self.assertEqual(str.encode("utf-8"), expected)
+ self.assertEqual(soup.p.encode("utf-8"), expected)
def test_real_iso_latin_document(self):
# Smoke test of interrelated functionality, using an