MCPcopy
hub / github.com/scrapy/scrapy / test_store_without_acl

Method test_store_without_acl

tests/test_feedexport_storages.py:410–427  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

408
409 @coroutine_test
410 async def test_store_without_acl(self):
411 storage = S3FeedStorage(
412 "s3://mybucket/export.csv",
413 "access_key",
414 "secret_key",
415 )
416 assert storage.access_key == "access_key"
417 assert storage.secret_key == "secret_key"
418 assert storage.acl is None
419
420 storage.s3_client = mock.MagicMock()
421 await maybe_deferred_to_future(storage.store(BytesIO(b"test file")))
422 acl = (
423 storage.s3_client.upload_fileobj.call_args[1]
424 .get("ExtraArgs", {})
425 .get("ACL")
426 )
427 assert acl is None
428
429 @coroutine_test
430 async def test_store_with_acl(self):

Callers

nothing calls this directly

Calls 4

S3FeedStorageClass · 0.90
maybe_deferred_to_futureFunction · 0.90
storeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected