Exemplo n.º 1
0
 def test_boolean_attribute_xml_adds_empty_string(self):
     # html serialized as xml converts boolean attributes to empty strings
     fragment = '<tag attribute></tag>'
     self.assertEqual(self.etree.tostring(html.fragment_fromstring(fragment)),
                      _bytes('<tag attribute=""/>'))
Exemplo n.º 2
0
 def test_boolean_attribute_xml_adds_empty_string(self):
     # html serialized as xml converts boolean attributes to empty strings
     fragment = '<tag attribute></tag>'
     self.assertEqual(
         self.etree.tostring(html.fragment_fromstring(fragment)),
         _bytes('<tag attribute=""/>'))
Exemplo n.º 3
0
 def test_boolean_attribute_round_trip(self):
     # ability to pass boolean attributes unmodified
     fragment = '<tag attribute></tag>'
     self.assertEqual(html.tostring(html.fragment_fromstring(fragment)),
                      _bytes(fragment))
Exemplo n.º 4
0
 def test_boolean_attribute_round_trip(self):
     # ability to pass boolean attributes unmodified
     fragment = '<tag attribute></tag>'
     self.assertEqual(html.tostring(html.fragment_fromstring(fragment)),
                      _bytes(fragment))