Пример #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=""/>'))
Пример #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=""/>'))
Пример #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))
Пример #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))