MCPcopy
hub / github.com/scrapy/scrapy / assertExportResult

Method assertExportResult

tests/test_exporters.py:407–414  ·  view source on GitHub ↗
(self, item, expected_value)

Source from the content-addressed store, hash-verified

405 assert xmlsplit(first) == xmlsplit(second), msg
406
407 def assertExportResult(self, item, expected_value):
408 fp = BytesIO()
409 ie = XmlItemExporter(fp)
410 ie.start_exporting()
411 ie.export_item(item)
412 ie.finish_exporting()
413 del ie # See the first “del self.ie” in this file for context.
414 self.assertXmlEquivalent(fp.getvalue(), expected_value)
415
416 def _check_output(self):
417 expected_value = (

Callers 4

test_nested_itemMethod · 0.95
test_nested_list_itemMethod · 0.95

Calls 5

start_exportingMethod · 0.95
export_itemMethod · 0.95
finish_exportingMethod · 0.95
assertXmlEquivalentMethod · 0.95
XmlItemExporterClass · 0.90

Tested by

no test coverage detected