当前位置: 首页>>代码示例>>Python>>正文


Python s3.make_s3_files函数代码示例

本文整理汇总了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')
开发者ID:HackedByChinese,项目名称:aws-cli,代码行数:7,代码来源:test_filegenerator.py

示例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'
开发者ID:bw57899,项目名称:aws-cli,代码行数:7,代码来源:test_filegenerator.py

示例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'])
开发者ID:2mind,项目名称:aws-cli,代码行数:7,代码来源:test_s3.py

示例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()
开发者ID:50onRed,项目名称:aws-cli,代码行数:7,代码来源:test_s3handler.py

示例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))
开发者ID:hardiku,项目名称:aws-cli,代码行数:27,代码来源:test_s3handler.py

示例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)
开发者ID:SydOps,项目名称:aws-cli,代码行数:8,代码来源:test_s3handler.py

示例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()
开发者ID:viglesiasce,项目名称:aws-cli,代码行数:8,代码来源:test_s3handler.py

示例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
开发者ID:Gimpson,项目名称:aws-cli,代码行数:8,代码来源:test_s3.py

示例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']
开发者ID:TarantulaTechnology,项目名称:aws,代码行数:8,代码来源:test_s3handler.py

示例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)
开发者ID:TarantulaTechnology,项目名称:aws,代码行数:9,代码来源:test_s3handler.py

示例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']
开发者ID:2mind,项目名称:aws-cli,代码行数:10,代码来源:test_s3handler.py

示例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'
开发者ID:SydOps,项目名称:aws-cli,代码行数:12,代码来源:test_filegenerator.py

示例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]
开发者ID:hardiku,项目名称:aws-cli,代码行数:18,代码来源:test_s3handler.py

示例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'
开发者ID:2mind,项目名称:aws-cli,代码行数:5,代码来源:test_filegenerator.py

示例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'
开发者ID:2mind,项目名称:aws-cli,代码行数:5,代码来源:test_filegenerator.py


注:本文中的tests.unit.customizations.s3.make_s3_files函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。