def test_drop_tree(): f = (e.xpath('//*[@id="drop-tree"]') | e.drop_tree(e.css('script')) | e.xpath('string()')) assert f(create_response(example)) == ['Drop this please.']