本文整理汇总了Python中sinastorage.bucket.SCSBucket.delete_bucket方法的典型用法代码示例。如果您正苦于以下问题:Python SCSBucket.delete_bucket方法的具体用法?Python SCSBucket.delete_bucket怎么用?Python SCSBucket.delete_bucket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sinastorage.bucket.SCSBucket
的用法示例。
在下文中一共展示了SCSBucket.delete_bucket方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_remove_bucket
# 需要导入模块: from sinastorage.bucket import SCSBucket [as 别名]
# 或者: from sinastorage.bucket.SCSBucket import delete_bucket [as 别名]
def test_remove_bucket(self):
scs = SCSBucket(self.bucket_name)
scs.put_bucket()
try:
scs.delete_bucket()
except:
self.fail('Remove bucket:%s is failed'%self.bucket_name)
示例2: tearDown
# 需要导入模块: from sinastorage.bucket import SCSBucket [as 别名]
# 或者: from sinastorage.bucket.SCSBucket import delete_bucket [as 别名]
def tearDown(self):
scs = SCSBucket(self.bucket_name)
if scs.exist() :
try:
file_gen = scs.listdir()
for item in file_gen:
if not item[1]:
scs.delete(item[0])
scs.delete_bucket()
except Exception as err:
self.fail('empty bucket failed.Error is %s'%err)
示例3: remove_bucket
# 需要导入模块: from sinastorage.bucket import SCSBucket [as 别名]
# 或者: from sinastorage.bucket.SCSBucket import delete_bucket [as 别名]
def remove_bucket():
s = SCSBucket('222dasdasdasd')
s.delete_bucket()