File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11sudo : false
22language : python
33python :
4- - ' 2.6'
54- ' 2.7'
65- ' 3.5'
76- ' 3.6'
Original file line number Diff line number Diff line change 2424 SecretId = SECRET_ID ,
2525 SecretKey = SECRET_KEY ,
2626)
27- client = CosS3Client (conf )
27+ client = CosS3Client (conf , retry = 3 )
2828
2929
3030def _create_test_bucket (test_bucket ):
@@ -638,6 +638,18 @@ def test_list_multipart_uploads():
638638 )
639639
640640
641+ def test_upload_file_from_buffer ():
642+ import io
643+ data = io .BytesIO (6 * 1024 * 1024 * 'A' )
644+ response = client .upload_file_from_buffer (
645+ Bucket = test_bucket ,
646+ Key = 'test_upload_from_buffer' ,
647+ Body = data ,
648+ MaxBufferSize = 5 ,
649+ PartSize = 1
650+ )
651+
652+
641653def test_upload_file_multithreading ():
642654 """根据文件大小自动选择分块大小,多线程并发上传提高上传速度"""
643655 file_name = "thread_1GB"
You can’t perform that action at this time.
0 commit comments