(self)
| 536 | |
| 537 | @coroutine_test |
| 538 | async def test_start_finish_exporting_items(self): |
| 539 | items = [ |
| 540 | self.MyItem({"foo": "bar1", "egg": "spam1"}), |
| 541 | ] |
| 542 | settings = { |
| 543 | "FEEDS": { |
| 544 | self._random_temp_filename(): {"format": "json"}, |
| 545 | }, |
| 546 | "FEED_EXPORT_INDENT": None, |
| 547 | } |
| 548 | |
| 549 | listener = IsExportingListener() |
| 550 | InstrumentedFeedSlot.subscribe__listener(listener) |
| 551 | |
| 552 | with mock.patch("scrapy.extensions.feedexport.FeedSlot", InstrumentedFeedSlot): |
| 553 | await self.exported_data(items, settings) |
| 554 | assert not listener.start_without_finish |
| 555 | assert not listener.finish_without_start |
| 556 | |
| 557 | @coroutine_test |
| 558 | async def test_start_finish_exporting_no_items(self): |
nothing calls this directly
no test coverage detected