示例#1
0
 def test_upload_file_proxies_to_transfer_object(self):
     with mock.patch('boto3.s3.inject.S3Transfer') as transfer:
         inject.upload_file(mock.sentinel.CLIENT,
                            Filename='filename',
                            Bucket='bucket', Key='key')
         transfer.return_value.upload_file.assert_called_with(
             filename='filename', bucket='bucket', key='key',
             extra_args=None, callback=None)
示例#2
0
 def test_upload_file_proxies_to_transfer_object(self):
     with mock.patch('boto3.s3.inject.S3Transfer') as transfer:
         inject.upload_file(mock.sentinel.CLIENT,
                            Filename='filename',
                            Bucket='bucket', Key='key')
         transfer.return_value.upload_file.assert_called_with(
             filename='filename', bucket='bucket', key='key',
             extra_args=None, callback=None)