本文整理汇总了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)
开发者ID:rtblife97,项目名称:swift,代码行数:7,代码来源:test_object.py
示例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)
开发者ID:Nexenta,项目名称:swift,代码行数:7,代码来源:test_object.py
示例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)
开发者ID:rtblife97,项目名称:swift,代码行数:7,代码来源:test_object.py
示例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)
开发者ID:Nexenta,项目名称:swift,代码行数:7,代码来源:test_object.py
示例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)
开发者ID:rtblife97,项目名称:swift,代码行数:7,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例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)
开发者ID:portante,项目名称:swift,代码行数:8,代码来源:test_object.py
示例14: head
def head(url, token, parsed, conn):
conn.request('HEAD', parsed.path, '',
{'X-Auth-Token': token})
return check_response(conn)
开发者ID:aawm,项目名称:swift,代码行数:4,代码来源:test_account.py
示例15: post
def post(url, token, parsed, conn):
conn.request('POST', parsed.path, '',
{'X-Auth-Token': token})
return check_response(conn)
开发者ID:aawm,项目名称:swift,代码行数:4,代码来源:test_account.py
注:本文中的test.functional.check_response函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论