本文整理汇总了Python中swift_testing.check_response函数的典型用法代码示例。如果您正苦于以下问题:Python check_response函数的具体用法?Python check_response怎么用?Python check_response使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_response函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: put
def put(url, token, parsed, conn):
conn.request('PUT', '%s/%s' % (parsed.path,
shared_container), '',
{'X-Auth-Token': token,
'X-Container-Read': swift_test_perm[2],
'X-Container-Write': swift_test_perm[2]})
return check_response(conn)
示例2: put
def put(url, token, parsed, conn):
conn.request('PUT', '%s/%s/manifest' % (
parsed.path, self.container), '',
{'X-Auth-Token': token,
'X-Object-Manifest': '%s/segments3/' % acontainer,
'Content-Length': '0'})
return check_response(conn)
示例3: copy
def copy(url, token, parsed, conn):
conn.request('PUT', '%s/%s/%s' % (
parsed.path, shared_container, 'private_object'), '',
{'X-Auth-Token': token,
'Content-Length': '0',
'X-Copy-From': '%s/%s' % (self.container, self.obj)})
return check_response(conn)
示例4: copy3
def copy3(url, token, parsed, conn):
conn.request('COPY', '%s/%s/%s' % (
parsed.path, self.container, self.obj), '',
{'X-Auth-Token': token,
'Destination': '%s/%s' % (shared_container,
'private_object')})
return check_response(conn)
示例5: post
def post(url, token, parsed, conn):
conn.request(
"POST",
"%s/%s" % (parsed.path, acontainer),
"",
{"X-Auth-Token": token, "X-Container-Read": swift_test_user[2]},
)
return check_response(conn)
示例6: put
def put(url, token, parsed, conn):
conn.request(
"PUT",
"%s/%s" % (parsed.path, dest),
"",
{"X-Auth-Token": token, "Content-Length": "0", "X-Copy-From": source},
)
return check_response(conn)
示例7: get
def get(url, token, parsed, conn):
conn.request(
"GET",
"%s/%s/manifest" % (parsed.path, self.container),
"",
{"X-Auth-Token": token, "Range": "bytes=5-10"},
)
return check_response(conn)
示例8: copy3
def copy3(url, token, parsed, conn):
conn.request(
"COPY",
"%s/%s/%s" % (parsed.path, self.container, self.obj),
"",
{"X-Auth-Token": token, "Destination": "%s/%s" % (shared_container, "private_object")},
)
return check_response(conn)
示例9: copy2
def copy2(url, token, parsed, conn):
conn.request(
"COPY",
"%s/%s/%s" % (parsed.path, shared_container, "obj1"),
"",
{"X-Auth-Token": token, "Destination": "%s/%s" % (shared_container, "obj1")},
)
return check_response(conn)
示例10: copy
def copy(url, token, parsed, conn):
conn.request(
"PUT",
"%s/%s/%s" % (parsed.path, shared_container, "private_object"),
"",
{"X-Auth-Token": token, "Content-Length": "0", "X-Copy-From": "%s/%s" % (self.container, self.obj)},
)
return check_response(conn)
示例11: copy2
def copy2(url, token, parsed, conn):
conn.request('COPY', '%s/%s/%s' % (parsed.path,
shared_container,
'obj1'),
'', {'X-Auth-Token': token,
'Destination': '%s/%s' % (shared_container,
'obj1')})
return check_response(conn)
示例12: get
def get(url, token, parsed, conn):
conn.request('GET', parsed.path, '', {'X-Auth-Token': token})
return check_response(conn)
示例13: post
def post(url, token, parsed, conn, name, value):
conn.request('POST', parsed.path, '',
{'X-Auth-Token': token, name: value})
return check_response(conn)
示例14: delete
def delete(url, token, parsed, conn):
conn.request('DELETE', parsed.path + '/' + self.name, '',
{'X-Auth-Token': token})
return check_response(conn)
示例15: put
def put(url, token, parsed, conn):
container_name = 'X' * 2048
conn.request('PUT', '%s/%s' % (parsed.path,
container_name), 'there', {'X-Auth-Token': token})
return check_response(conn)