Skip to content

Commit 701b025

Browse files
author
tiedu
committed
modify select ut
1 parent b316af8 commit 701b025

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

qcloud_cos/select_event_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import uuid
44
import struct
5-
from cos_comm import xml_to_dict
5+
from .cos_comm import xml_to_dict
66

77

88
class EventStream():

ut/test.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,12 +1110,20 @@ def test_put_get_traffic_limit():
11101110

11111111

11121112
def test_select_object():
1113-
"""测试SQL检索COS对象"""
1113+
"""测试SQL检索COS对象(只支持国内)"""
11141114
select_obj = "select_test.json"
11151115
json_body = {
11161116
'name': 'cos',
11171117
'age': '999'
11181118
}
1119+
conf = CosConfig(
1120+
Region='ap-guangzhou',
1121+
SecretId=SECRET_ID,
1122+
SecretKey=SECRET_KEY,
1123+
)
1124+
test_bucket = 'test-select-' + APPID
1125+
_create_test_bucket(test_bucket, 'ap-guangzhou')
1126+
client = CosS3Client(conf)
11191127
response = client.put_object(
11201128
Bucket=test_bucket,
11211129
Key=select_obj,

0 commit comments

Comments
 (0)