本文整理匯總了Python中radula.RadulaProxy.info方法的典型用法代碼示例。如果您正苦於以下問題:Python RadulaProxy.info方法的具體用法?Python RadulaProxy.info怎麽用?Python RadulaProxy.info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類radula.RadulaProxy
的用法示例。
在下文中一共展示了RadulaProxy.info方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: bucket_info_test
# 需要導入模塊: from radula import RadulaProxy [as 別名]
# 或者: from radula.RadulaProxy import info [as 別名]
def bucket_info_test():
radu = RadulaProxy(connection=boto.connect_s3())
radu.make_bucket(subject=TEST_BUCKET)
sys.stdout.truncate(0)
radu.info(subject=TEST_BUCKET)
out = sys.stdout.getvalue().strip()
info = json.loads(out)
for k in ('keys', 'size_human', 'size'):
assert_in(k, info)
key_info = info.get("keys")
for k in ('count', 'largest', 'newest', 'oldest'):
assert_in(k, key_info)
示例2: key_info_test
# 需要導入模塊: from radula import RadulaProxy [as 別名]
# 或者: from radula.RadulaProxy import info [as 別名]
def key_info_test():
radu = RadulaProxy(connection=boto.connect_s3())
radu.make_bucket(subject=TEST_BUCKET)
# give something to info
args = vars(_parse_args(['up']))
remote_file = REMOTE_FILE
args.update({
"subject": TEST_FILE,
"target": remote_file
})
radu.upload(**args)
sys.stdout.truncate(0)
radu.info(subject=REMOTE_FILE)
out = sys.stdout.getvalue().strip()
info = json.loads(out)
for k in ('content_length', 'owner', 'size', 'bucket'):
assert_in(k, info)
assert_equal(info.get("bucket"), TEST_BUCKET)
示例3: key_info_bad_subject_test
# 需要導入模塊: from radula import RadulaProxy [as 別名]
# 或者: from radula.RadulaProxy import info [as 別名]
def key_info_bad_subject_test():
radu = RadulaProxy(connection=boto.connect_s3())
radu.make_bucket(subject=TEST_BUCKET)
radu.info(subject=REMOTE_FILE)