本文整理汇总了Python中tests.unit.customizations.s3.make_s3_files函数的典型用法代码示例。如果您正苦于以下问题:Python make_s3_files函数的具体用法?Python make_s3_files怎么用?Python make_s3_files使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_s3_files函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
self.session = FakeSession()
self.bucket = make_s3_files(self.session)
self.file1 = self.bucket + '/' + 'text1.txt'
self.file2 = self.bucket + '/' + 'another_directory/text2.txt'
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
示例2: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
self.bucket = make_s3_files(self.session)
self.file1 = self.bucket + '/' + 'text1.txt'
self.file2 = self.bucket + '/' + 'another_directory/text2.txt'
示例3: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
self.loc_files = make_loc_files()
self.bucket = make_s3_files(self.session)
parser = argparse.ArgumentParser()
parser.add_argument('--region')
self.parsed_globals = parser.parse_args(['--region', 'us-east-1'])
示例4: setUp
def setUp(self):
super(S3HandlerTestDeleteList, self).setUp()
self.session = FakeSession()
params = {'region': 'us-east-1'}
self.s3_handler = S3Handler(self.session, params)
self.bucket = make_s3_files(self.session)
self.loc_files = make_loc_files()
示例5: setUp
def setUp(self):
super(S3HandlerTestDownload, self).setUp()
self.session = FakeSession()
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
params = {'region': 'us-east-1'}
self.s3_handler = S3Handler(self.session, params)
self.s3_handler_multi = S3Handler(
self.session, params,
runtime_config=runtime_config(multipart_threshold=10,
multipart_chunksize=2))
self.bucket = make_s3_files(self.session)
self.s3_files = [self.bucket + '/text1.txt',
self.bucket + '/another_directory/text2.txt']
directory1 = os.path.abspath('.') + os.sep + 'some_directory' + os.sep
filename1 = directory1 + "text1.txt"
directory2 = directory1 + 'another_directory' + os.sep
filename2 = directory2 + "text2.txt"
self.loc_files = [filename1, filename2]
self.fail_session = FakeSession(connection_error=True)
self.fail_session.s3 = self.session.s3
self.s3_handler_multi_except = S3Handler(
self.fail_session, params,
runtime_config=runtime_config(
multipart_threshold=10,
multipart_chunksize=2))
示例6: setUp
def setUp(self):
super(S3HandlerTestURLEncodeDeletes, self).setUp()
self.session = FakeSession()
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
params = {'region': 'us-east-1'}
self.s3_handler = S3Handler(self.session, params)
self.bucket = make_s3_files(self.session, key1='a+b/foo', key2=None)
示例7: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
self.service = self.session.get_service("s3")
self.endpoint = self.service.get_endpoint("us-east-1")
params = {"region": "us-east-1"}
self.s3_handler = S3Handler(self.session, params)
self.bucket = make_s3_files(self.session)
self.loc_files = make_loc_files()
示例8: setUp
def setUp(self):
super(CommandArchitectureTest, self).setUp()
self.session = FakeSession()
self.bucket = make_s3_files(self.session)
self.loc_files = make_loc_files()
self.output = StringIO()
self.saved_stdout = sys.stdout
sys.stdout = self.output
示例9: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
params = {'region': 'us-east-1', 'acl': ['private']}
self.s3_handler = S3Handler(self.session, params)
self.bucket = make_s3_files(self.session, key1=u'\u2713')
self.bucket2 = create_bucket(self.session)
self.s3_files = [self.bucket + '/' + u'\u2713']
self.s3_files2 = [self.bucket2 + '/' + u'\u2713']
示例10: test_move_unicode
def test_move_unicode(self):
self.bucket2 = make_s3_files(self.session, key1=u'\u2713')
tasks = [FileInfo(src=self.bucket2 + '/' + u'\u2713',
src_type='s3',
dest=self.bucket + '/' + u'\u2713',
dest_type='s3', operation='move',
size=0)]
self.s3_handler.call(tasks)
self.assertEqual(len(list_contents(self.bucket, self.session)), 1)
示例11: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
params = {'region': 'us-east-1', 'acl': ['private']}
self.s3_handler = S3Handler(self.session, params)
self.bucket = make_s3_files(self.session)
self.bucket2 = create_bucket(self.session)
self.s3_files = [self.bucket + '/text1.txt',
self.bucket + '/another_directory/text2.txt']
self.s3_files2 = [self.bucket2 + '/text1.txt',
self.bucket2 + '/another_directory/text2.txt']
示例12: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
# Use the datetime and and blob parsing of the CLI
factory = self.session.get_component('response_parser_factory')
factory.set_parser_defaults(
blob_parser=lambda x: x,
timestamp_parser=lambda x: x)
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
self.bucket = make_s3_files(self.session)
self.file1 = self.bucket + '/' + 'text1.txt'
self.file2 = self.bucket + '/' + 'another_directory/text2.txt'
示例13: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
params = {'region': 'us-east-1'}
self.s3_handler = S3Handler(self.session, params)
self.s3_handler_multi = S3Handler(
self.session, params,
runtime_config=runtime_config(multipart_threshold=10,
multipart_chunksize=2))
self.bucket = make_s3_files(self.session)
self.s3_files = [self.bucket + '/text1.txt',
self.bucket + '/another_directory/text2.txt']
directory1 = os.path.abspath('.') + os.sep + 'some_directory' + os.sep
filename1 = directory1 + "text1.txt"
directory2 = directory1 + 'another_directory' + os.sep
filename2 = directory2 + "text2.txt"
self.loc_files = [filename1, filename2]
示例14: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
self.bucket = make_s3_files(self.session)
self.file1 = self.bucket + '/' + 'text1.txt'
self.file2 = self.bucket + '/' + 'another_directory/text2.txt'
示例15: setUp
def setUp(self):
self.session = FakeSession()
self.bucket = make_s3_files(self.session)
self.file1 = self.bucket + '/' + 'text1.txt'
self.file2 = self.bucket + '/' + 'another_directory/text2.txt'