File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -758,6 +758,7 @@ def test_put_object_enable_md5():
758758 with open (file_name , 'rb' ) as f :
759759 etag = get_raw_md5 (f .read ())
760760 with open (file_name , 'rb' ) as fp :
761+ # fp验证
761762 put_response = client .put_object (
762763 Bucket = test_bucket ,
763764 Body = fp ,
@@ -766,7 +767,16 @@ def test_put_object_enable_md5():
766767 CacheControl = 'no-cache' ,
767768 ContentDisposition = 'download.txt'
768769 )
769- assert etag == put_response ['Etag' ]
770+ assert etag == put_response ['ETag' ]
771+ put_response = client .put_object (
772+ Bucket = test_bucket ,
773+ Body = 'TestMD5' ,
774+ Key = file_name ,
775+ EnableMD5 = True ,
776+ CacheControl = 'no-cache' ,
777+ ContentDisposition = 'download.txt'
778+ )
779+ assert put_response
770780 if os .path .exists (file_name ):
771781 os .remove (file_name )
772782
@@ -877,7 +887,7 @@ def test_put_file_like_object():
877887 Bucket = test_bucket ,
878888 Key = 'test_file_like_object' ,
879889 Body = input ,
880- EnableMD5 = True
890+ EnableMD5 = True
881891 )
882892 assert rt
883893
You can’t perform that action at this time.
0 commit comments