MCPcopy
hub / github.com/scrapy/scrapy / test_export_items

Method test_export_items

tests/test_feedexport.py:512–523  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

510
511 @coroutine_test
512 async def test_export_items(self):
513 # feed exporters use field names from Item
514 items = [
515 self.MyItem({"foo": "bar1", "egg": "spam1"}),
516 self.MyItem({"foo": "bar2", "egg": "spam2", "baz": "quux2"}),
517 ]
518 rows = [
519 {"egg": "spam1", "foo": "bar1", "baz": ""},
520 {"egg": "spam2", "foo": "bar2", "baz": "quux2"},
521 ]
522 header = self.MyItem.fields.keys()
523 await self.assertExported(items, header, rows)
524
525 @coroutine_test
526 async def test_export_no_items_not_store_empty(self):

Callers

nothing calls this directly

Calls 2

keysMethod · 0.80
assertExportedMethod · 0.80

Tested by

no test coverage detected