Skip to content

Commit f60297e

Browse files
author
flynnzzhang
committed
update ut
1 parent 75ca814 commit f60297e

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

ut/test.py

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def token(self):
101101
mi_face_search_dataset_name = "ci-sdk-face-search"
102102
mi_face_search_file = "face.jpeg"
103103

104+
104105
def _create_test_bucket(test_bucket, create_region=None):
105106
try:
106107
if create_region is None:
@@ -225,14 +226,22 @@ def setUp():
225226
_upload_test_file(copy_test_bucket, test_object)
226227
response = client.ci_get_asr_bucket(BucketName=ci_bucket_name)
227228
if response['TotalCount'] == '0':
228-
client.ci_open_asr_bucket(ci_bucket_name)
229+
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
230+
response, data = client.ci_open_asr_bucket(
231+
Bucket=ci_bucket_name,
232+
**kwargs
233+
)
229234

230235

231236
def tearDown():
232237
print("function teardown")
233238
response = client.ci_get_asr_bucket(BucketName=ci_bucket_name)
234239
if response['TotalCount'] != '0':
235-
client.ci_close_asr_bucket(ci_bucket_name)
240+
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
241+
response, data = client.ci_close_asr_bucket(
242+
Bucket=ci_bucket_name,
243+
**kwargs
244+
)
236245

237246

238247
def test_cos_comm_format_region():
@@ -5916,22 +5925,6 @@ def test_ci_ai_bucket():
59165925
assert data['AiBucket']['Name'] == ci_bucket_name
59175926

59185927

5919-
def test_ci_asr_bucket():
5920-
# 关闭智能语音服务
5921-
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
5922-
response, data = client.ci_close_asr_bucket(
5923-
Bucket=ci_bucket_name,
5924-
**kwargs
5925-
)
5926-
assert data['BucketName'] == ci_bucket_name
5927-
5928-
response, data = client.ci_open_asr_bucket(
5929-
Bucket=ci_bucket_name,
5930-
**kwargs
5931-
)
5932-
assert data['AsrBucket']['Name'] == ci_bucket_name
5933-
5934-
59355928
def test_ci_hls_play_key():
59365929
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
59375930

0 commit comments

Comments
 (0)