diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-04-26 12:55:59 -0400 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-04-26 12:55:59 -0400 |
commit | d1261fb0a2df9929658dfdc9fe5880974e287d21 (patch) | |
tree | 39f1ffc1a9efe21e0f45386a96cbbb495301559d /bs4/tests/test_tree.py | |
parent | 12f37383078c18a37968a8446961eff7a4e77e75 (diff) |
Renamed replace_with_children() to the jQuery name, unwrap().
Diffstat (limited to 'bs4/tests/test_tree.py')
-rw-r--r-- | bs4/tests/test_tree.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py index 2dea886..867fdaa 100644 --- a/bs4/tests/test_tree.py +++ b/bs4/tests/test_tree.py @@ -712,11 +712,11 @@ class TestTreeModification(SoupTest): new_a = a.replace_with(soup.c) self.assertEqual(a, new_a) - def test_replace_with_children_returns_thing_that_was_replaced(self): + def test_unwrap_returns_thing_that_was_replaced(self): text = "<a><b></b><c></c></a>" soup = self.soup(text) a = soup.a - new_a = a.replace_with_children() + new_a = a.unwrap() self.assertEqual(a, new_a) def test_replace_tag_with_itself(self): @@ -918,11 +918,11 @@ class TestTreeModification(SoupTest): self.assertEqual(g_tag.previous_element, to_text) self.assertEqual(g_tag.previous_sibling, to_text) - def test_replace_with_children(self): + def test_unwrap(self): tree = self.soup(""" <p>Unneeded <em>formatting</em> is unneeded</p> """) - tree.em.replace_with_children() + tree.em.unwrap() self.assertEqual(tree.em, None) self.assertEqual(tree.p.text, "Unneeded formatting is unneeded") |