(self)
| 799 | d.after(self.html) # this should not fail |
| 800 | |
| 801 | def test_replaceWith(self): |
| 802 | expected = '''<div class="portlet"> |
| 803 | <a href="/toto">TestimageMy link text</a> |
| 804 | <a href="/toto2">imageMy link text 2</a> |
| 805 | Behind you, a three-headed HTML&dash;Entity! |
| 806 | </div>''' |
| 807 | d = pq(self.html) |
| 808 | d('img').replace_with('image') |
| 809 | val = d.__html__() |
| 810 | assert val == expected, (repr(val), repr(expected)) |
| 811 | |
| 812 | def test_replaceWith_with_function(self): |
| 813 | expected = '''<div class="portlet"> |
nothing calls this directly
no test coverage detected