def test_remove_attribute(self): element = Element("div") element.remove_attribute("foo") element.set_attribute("foo", "bar") element.remove_attribute("foo") assert_is_none(element.get_attribute("foo")) assert_equal([b"<div>", b"</div>"], list(iter(element)))
def test_remove_attribute(self): element = Element("div") element.remove_attribute("foo") element.set_attribute("foo", "bar") element.remove_attribute("foo") assert_is_none(element.get_attribute("foo")) assert_equal([b'<div>', b"</div>"], list(iter(element)))
def test_attribute_names(self): element = Element("div") element.set_attribute("foo", "") element.set_attribute("bar", "") element.remove_attribute("foo") assert_equal({"bar"}, element.attribute_names)