def test_tag_accepts_name(self): tdd_dom.tag("")
def test_tag_accepts_is_closed(self): result = tdd_dom.tag("div", "", {"id": "123"}, False) self.assertTrue(result.endswith("/>"))
def test_tag_accepts_attributes(self): result = tdd_dom.tag("div", "", {"id": "123"}) self.assertTrue("id=\"123\"" in result)
def test_tag_returns_content(self): self.assertTrue("content" in tdd_dom.tag("div", "content"))
def test_tag_is_html_tag(self): self.assertTrue(tdd_dom.tag().startswith("<")) self.assertTrue(tdd_dom.tag().endswith(">"))
def test_tag_defaults_to_div(self): self.assertTrue("div" in tdd_dom.tag())