MCPcopy
hub / github.com/scrapy/scrapy / _store

Method _store

tests/test_feedexport_storages.py:127–138  ·  view source on GitHub ↗
(self, uri, content, feed_options=None, settings=None)

Source from the content-addressed store, hash-verified

125 return TestSpider.from_crawler(crawler)
126
127 async def _store(self, uri, content, feed_options=None, settings=None):
128 crawler = get_crawler(settings_dict=settings or {})
129 storage = FTPFeedStorage.from_crawler(
130 crawler,
131 uri,
132 feed_options=feed_options,
133 )
134 verifyObject(IFeedStorage, storage)
135 spider = self.get_test_spider()
136 file = storage.open(spider)
137 file.write(content)
138 await maybe_deferred_to_future(storage.store(file))
139
140 def _assert_stored(self, path: Path, content):
141 assert path.exists()

Callers 4

test_appendMethod · 0.95
test_overwriteMethod · 0.95

Calls 7

get_test_spiderMethod · 0.95
get_crawlerFunction · 0.90
maybe_deferred_to_futureFunction · 0.90
from_crawlerMethod · 0.45
openMethod · 0.45
writeMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected