MCPcopy
hub / github.com/aws/aws-cli / test_upload

Method test_upload

tests/integration/customizations/s3/test_plugin.py:1871–1882  ·  view source on GitHub ↗

This tests uploading a small stream from stdin.

(self, s3_utils, shared_bucket)

Source from the content-addressed store, hash-verified

1869
1870class TestStreams(BaseParameterizedS3ClientTest):
1871 def test_upload(self, s3_utils, shared_bucket):
1872 """
1873 This tests uploading a small stream from stdin.
1874 """
1875 p = aws(
1876 's3 cp - s3://%s/stream' % shared_bucket,
1877 input_data=b'This is a test',
1878 )
1879 self.assert_no_errors(p)
1880 assert s3_utils.key_exists(shared_bucket, 'stream')
1881 contents = s3_utils.get_key_contents(shared_bucket, 'stream')
1882 assert contents == 'This is a test'
1883
1884 def test_unicode_upload(self, s3_utils, shared_bucket):
1885 """

Callers

nothing calls this directly

Calls 4

awsFunction · 0.70
assert_no_errorsMethod · 0.45
key_existsMethod · 0.45
get_key_contentsMethod · 0.45

Tested by

no test coverage detected