(self)
| 560 | self.assertEqual(str, domstr) |
| 561 | |
| 562 | def test_toxml_quote_text(self): |
| 563 | dom = Document() |
| 564 | elem = dom.appendChild(dom.createElement('elem')) |
| 565 | elem.appendChild(dom.createTextNode('&<>"')) |
| 566 | cr = elem.appendChild(dom.createElement('cr')) |
| 567 | cr.appendChild(dom.createTextNode('\r')) |
| 568 | crlf = elem.appendChild(dom.createElement('crlf')) |
| 569 | crlf.appendChild(dom.createTextNode('\r\n')) |
| 570 | lflf = elem.appendChild(dom.createElement('lflf')) |
| 571 | lflf.appendChild(dom.createTextNode('\n\n')) |
| 572 | ws = elem.appendChild(dom.createElement('ws')) |
| 573 | ws.appendChild(dom.createTextNode('\t\n\r ')) |
| 574 | domstr = dom.toxml() |
| 575 | dom.unlink() |
| 576 | self.assertEqual(domstr, '<?xml version="1.0" ?>' |
| 577 | '<elem>&<>"' |
| 578 | '<cr>\r</cr>' |
| 579 | '<crlf>\r\n</crlf>' |
| 580 | '<lflf>\n\n</lflf>' |
| 581 | '<ws>\t\n\r </ws></elem>') |
| 582 | |
| 583 | def test_toxml_quote_attrib(self): |
| 584 | dom = Document() |
nothing calls this directly
no test coverage detected