def test_html5lib_namespaced_attributes(self):
     bs_elt = DOM_HTML5LIB.create_tag("svg")
     DOM_HTML5LIB.append_child(
         bs_elt, DOM_HTML5LIB.create_tag("use", {"xlink:href": "test"}))
     self.assertEqual(
         DOM_HTML5LIB.render_debug(bs_elt),
         '<svg><use xlink:href="test"></use></svg>',
     )
Exemplo n.º 2
0
 def test_append_child(self):
     parent = DOM_HTML5LIB.create_tag('p')
     DOM_HTML5LIB.append_child(parent, DOM_HTML5LIB.create_tag('span', {}))
     self.assertEqual(DOM_HTML5LIB.render_debug(parent),
                      '<p><span></span></p>')
 def test_append_child(self):
     parent = DOM_HTML5LIB.create_tag("p")
     DOM_HTML5LIB.append_child(parent, DOM_HTML5LIB.create_tag("span", {}))
     self.assertEqual(
         DOM_HTML5LIB.render_debug(parent), "<p><span></span></p>"
     )
Exemplo n.º 4
0
 def test_html5lib_namespaced_attributes(self):
     bs_elt = DOM_HTML5LIB.create_tag('svg')
     DOM_HTML5LIB.append_child(
         bs_elt, DOM_HTML5LIB.create_tag('use', {'xlink:href': 'test'}))
     self.assertEqual(DOM_HTML5LIB.render_debug(bs_elt),
                      '<svg><use xlink:href="test"></use></svg>')
 def test_html5lib_namespaced_attributes(self):
     bs_elt = DOM_HTML5LIB.create_tag('svg')
     DOM_HTML5LIB.append_child(bs_elt, DOM_HTML5LIB.create_tag('use', {'xlink:href': 'test'}))
     self.assertEqual(DOM_HTML5LIB.render_debug(bs_elt), '<svg><use xlink:href="test"></use></svg>')
 def test_append_child(self):
     parent = DOM_HTML5LIB.create_tag('p')
     DOM_HTML5LIB.append_child(parent, DOM_HTML5LIB.create_tag('span', {}))
     self.assertEqual(DOM_HTML5LIB.render_debug(parent), '<p><span></span></p>')