File tree 1 file changed +12
-2
lines changed
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():
758
758
with open (file_name , 'rb' ) as f :
759
759
etag = get_raw_md5 (f .read ())
760
760
with open (file_name , 'rb' ) as fp :
761
+ # fp验证
761
762
put_response = client .put_object (
762
763
Bucket = test_bucket ,
763
764
Body = fp ,
@@ -766,7 +767,16 @@ def test_put_object_enable_md5():
766
767
CacheControl = 'no-cache' ,
767
768
ContentDisposition = 'download.txt'
768
769
)
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
770
780
if os .path .exists (file_name ):
771
781
os .remove (file_name )
772
782
@@ -877,7 +887,7 @@ def test_put_file_like_object():
877
887
Bucket = test_bucket ,
878
888
Key = 'test_file_like_object' ,
879
889
Body = input ,
880
- EnableMD5 = True
890
+ EnableMD5 = True
881
891
)
882
892
assert rt
883
893
You can’t perform that action at this time.
0 commit comments