@@ -1167,17 +1167,17 @@ def _test_get_object_sensitive_content_recognition():
11671167def test_download_file ():
11681168 """测试断点续传下载接口"""
11691169 #测试普通下载
1170- client .download_file (test_bucket , test_object , 'test_download_file.local' )
1170+ client .download_file (copy_test_bucket , test_object , 'test_download_file.local' )
11711171 if os .path .exists ('test_download_file.local' ):
11721172 os .remove ('test_download_file.local' )
11731173
11741174 # 测试限速下载
1175- client .download_file (test_bucket , test_object , 'test_download_traffic_limit.local' , TrafficLimit = '819200' )
1175+ client .download_file (copy_test_bucket , test_object , 'test_download_traffic_limit.local' , TrafficLimit = '819200' )
11761176 if os .path .exists ('test_download_traffic_limit.local' ):
11771177 os .remove ('test_download_traffic_limit.local' )
11781178
11791179 # 测试crc64校验开关
1180- client .download_file (test_bucket , test_object , 'test_download_crc.local' , EnableCRC = True )
1180+ client .download_file (copy_test_bucket , test_object , 'test_download_crc.local' , EnableCRC = True )
11811181 if os .path .exists ('test_download_crc.local' ):
11821182 os .remove ('test_download_crc.local' )
11831183
@@ -1193,20 +1193,20 @@ def test_download_file():
11931193 source_file_md5 = get_raw_md5 (f .read ())
11941194
11951195 client .put_object_from_local_file (
1196- Bucket = test_bucket ,
1196+ Bucket = copy_test_bucket ,
11971197 LocalFilePath = file_name ,
11981198 Key = file_name
11991199 )
12001200
1201- client .download_file (test_bucket , file_name , 'test_download_md5.local' )
1201+ client .download_file (copy_test_bucket , file_name , 'test_download_md5.local' )
12021202 if os .path .exists ('test_download_md5.local' ):
12031203 with open ('test_download_md5.local' , 'rb' ) as f :
12041204 dest_file_md5 = get_raw_md5 (f .read ())
12051205 assert source_file_md5 and dest_file_md5 and source_file_md5 == dest_file_md5
12061206
12071207 # 释放资源
12081208 client .delete_object (
1209- Bucket = test_bucket ,
1209+ Bucket = copy_test_bucket ,
12101210 Key = file_name
12111211 )
12121212 if os .path .exists (file_name ):
@@ -1237,6 +1237,7 @@ def test_download_file():
12371237 test_put_get_delete_bucket_domain()
12381238 test_select_object()
12391239 _test_get_object_sensitive_content_recognition()
1240+ test_download_file()
12401241 """
12411242
12421243 tearDown ()
0 commit comments