MCPcopy
hub / github.com/scrapy/scrapy / test_start_finish_exporting_no_items

Method test_start_finish_exporting_no_items

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

Source from the content-addressed store, hash-verified

556
557 @coroutine_test
558 async def test_start_finish_exporting_no_items(self):
559 items = []
560 settings = {
561 "FEEDS": {
562 self._random_temp_filename(): {"format": "json"},
563 },
564 "FEED_EXPORT_INDENT": None,
565 }
566
567 listener = IsExportingListener()
568 InstrumentedFeedSlot.subscribe__listener(listener)
569
570 with mock.patch("scrapy.extensions.feedexport.FeedSlot", InstrumentedFeedSlot):
571 await self.exported_data(items, settings)
572 assert not listener.start_without_finish
573 assert not listener.finish_without_start
574
575 @coroutine_test
576 async def test_start_finish_exporting_items_exception(self):

Callers

nothing calls this directly

Calls 4

IsExportingListenerClass · 0.85
_random_temp_filenameMethod · 0.80
subscribe__listenerMethod · 0.80
exported_dataMethod · 0.80

Tested by

no test coverage detected