• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python s3.make_s3_files函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中tests.unit.customizations.s3.make_s3_files函数的典型用法代码示例。如果您正苦于以下问题:Python make_s3_files函数的具体用法?Python make_s3_files怎么用?Python make_s3_files使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了make_s3_files函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: setUp

 def setUp(self):
     super(S3HandlerTestURLEncodeDeletes, self).setUp()
     self.session = FakeSession()
     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:TarantulaTechnology,项目名称:aws,代码行数:6,代码来源:test_s3handler.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python s3.s3_cleanup函数代码示例发布时间:2022-05-27
下一篇:
Python s3.make_loc_files函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap