(self, first, second, msg=None)
| 392 | return XmlItemExporter(self.output, **kwargs) |
| 393 | |
| 394 | def assertXmlEquivalent(self, first, second, msg=None): |
| 395 | def xmltuple(elem): |
| 396 | children = list(elem.iterchildren()) |
| 397 | if children: |
| 398 | return [(child.tag, sorted(xmltuple(child))) for child in children] |
| 399 | return [(elem.tag, [(elem.text, ())])] |
| 400 | |
| 401 | def xmlsplit(xmlcontent): |
| 402 | doc = lxml.etree.fromstring(xmlcontent) |
| 403 | return xmltuple(doc) |
| 404 | |
| 405 | assert xmlsplit(first) == xmlsplit(second), msg |
| 406 | |
| 407 | def assertExportResult(self, item, expected_value): |
| 408 | fp = BytesIO() |
no outgoing calls
no test coverage detected