summaryrefslogtreecommitdiff
path: root/tests/test_tree.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 15:08:51 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 15:08:51 -0500
commit89961f4de3ab1e88b15dd9c0aaa0af77a7c32262 (patch)
tree76d78c8831f0acb5a3a41bc628ffbd62b0bbfc6d /tests/test_tree.py
parent6de230d1f201c686d56e5f5a5241db69c316cea8 (diff)
Discovered that html5lib can't be made to support SoupStrainers, and changed the test suite appropriately.
Diffstat (limited to 'tests/test_tree.py')
-rw-r--r--tests/test_tree.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_tree.py b/tests/test_tree.py
index 8cbd309..384d518 100644
--- a/tests/test_tree.py
+++ b/tests/test_tree.py
@@ -524,14 +524,15 @@ class TestTreeModification(SoupTest):
def test_new_tag_creation(self):
builder = BeautifulSoup.default_builder()
- soup = self.soup("", builder=builder)
+ soup = self.soup("<body></body>", builder=builder)
a = Tag(soup, builder, 'a')
ol = Tag(soup, builder, 'ol')
a['href'] = 'http://foo.com/'
- soup.insert(0, a)
- soup.insert(1, ol)
+ soup.body.insert(0, a)
+ soup.body.insert(1, ol)
self.assertEqual(
- soup.decode(), '<a href="http://foo.com/"></a><ol></ol>')
+ soup.body.encode(),
+ '<body><a href="http://foo.com/"></a><ol></ol></body>')
def test_append_to_contents_moves_tag(self):
doc = """<p id="1">Don't leave me <b>here</b>.</p>