本文整理汇总了Python中test.functional.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/manifest' % (
parsed.path, self.container), '',
{'X-Auth-Token': token,
'X-Object-Manifest': '%s/segments3/' % acontainer,
'Content-Length': '0'})
return check_response(conn)
示例2: put
def put(url, token, parsed, conn):
conn.request('PUT', '%s/%s/%s' % (
parsed.path, self.container, 'if_none_match_test'), '',
{'X-Auth-Token': token,
'Content-Length': '0',
'If-None-Match': 'somethingelse'})
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: put_copy_from
def put_copy_from(url, token, parsed, conn, container, obj, source):
dest_path = '%s/%s/%s' % (parsed.path, container, obj)
conn.request('PUT', dest_path, '',
{'X-Auth-Token': token,
'Content-Length': '0',
'X-Copy-From': source})
return check_response(conn)
示例5: 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)
示例6: put
def put(url, token, parsed, conn):
conn.request(
"PUT",
"%s/%s/%s" % (parsed.path, self.container, "if_none_match_test"),
"",
{"X-Auth-Token": token, "Content-Length": "0", "If-None-Match": "somethingelse"},
)
return check_response(conn)
示例7: 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)
示例8: post
def post(url, token, parsed, conn):
conn.request(
"POST",
"%s/%s" % (parsed.path, acontainer),
"",
{"X-Auth-Token": token, "X-Container-Read": tf.swift_test_perm[2]},
)
return check_response(conn)
示例9: 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)
示例10: 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)
示例11: put_cors_cont
def put_cors_cont(url, token, parsed, conn, orig):
conn.request(
"PUT",
"%s/%s" % (parsed.path, self.container),
"",
{"X-Auth-Token": token, "X-Container-Meta-Access-Control-Allow-Origin": orig},
)
return check_response(conn)
示例12: delete
def delete(url, token, parsed, conn):
conn.request(
"DELETE",
"%s/%s/hi" % (parsed.path, self.container),
"",
{"X-Auth-Token": token, "X-If-Delete-At": "bad"},
)
return check_response(conn)
示例13: 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)
示例14: head
def head(url, token, parsed, conn):
conn.request('HEAD', parsed.path, '',
{'X-Auth-Token': token})
return check_response(conn)
示例15: post
def post(url, token, parsed, conn):
conn.request('POST', parsed.path, '',
{'X-Auth-Token': token})
return check_response(conn)