def setUp(self):
# Cleanup
self.addCleanup(patch.stopall)
# Request patch
self.request = patch.object(module, 'request').start()
# Various patches
self.services = patch.object(module, 'services').start()
self.original_config = dict(module.config)
module.config['STORAGE_BUCKET_NAME'] = self.bucket = 'buckbuck'
module.config['STORAGE_ACCESS_KEY_ID'] = ''
module.config['STORAGE_SECRET_ACCESS_KEY'] = ''
module.config['ACCESS_KEY_EXPIRES_IN'] = ''
module.config['STORAGE_PATH_PATTERN'] = '{owner}/{dataset}/{path}'
self.s3 = boto3.client('s3')
评论列表
文章目录