Skip to content

Commit

Permalink
modify select ut
Browse files Browse the repository at this point in the history
  • Loading branch information
tiedu committed Mar 13, 2020
1 parent b316af8 commit 701b025
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qcloud_cos/select_event_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import uuid
import struct
from cos_comm import xml_to_dict
from .cos_comm import xml_to_dict


class EventStream():
Expand Down
10 changes: 9 additions & 1 deletion ut/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,20 @@ def test_put_get_traffic_limit():


def test_select_object():
"""测试SQL检索COS对象"""
"""测试SQL检索COS对象(只支持国内)"""
select_obj = "select_test.json"
json_body = {
'name': 'cos',
'age': '999'
}
conf = CosConfig(
Region='ap-guangzhou',
SecretId=SECRET_ID,
SecretKey=SECRET_KEY,
)
test_bucket = 'test-select-' + APPID
_create_test_bucket(test_bucket, 'ap-guangzhou')
client = CosS3Client(conf)
response = client.put_object(
Bucket=test_bucket,
Key=select_obj,
Expand Down

0 comments on commit 701b025

Please sign in to comment.