Exemple #1
0
 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)))
Exemple #2
0
 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)))
Exemple #3
0
 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)
Exemple #4
0
 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)