本文整理汇总了Python中tests.unit.customizations.s3.make_loc_files函数的典型用法代码示例。如果您正苦于以下问题:Python make_loc_files函数的具体用法?Python make_loc_files怎么用?Python make_loc_files使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_loc_files函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: 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()
示例2: 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'])
示例3: setUp
def setUp(self):
self.local_file = os.path.abspath('.') + os.sep + 'some_directory' \
+ os.sep + 'text1.txt'
self.local_dir = os.path.abspath('.') + os.sep + 'some_directory' \
+ os.sep
self.session = FakeSession()
self.files = make_loc_files()
示例4: setUp
def setUp(self):
self.local_file = os.path.abspath(".") + os.sep + "some_directory" + os.sep + "text1.txt"
self.local_dir = os.path.abspath(".") + os.sep + "some_directory" + os.sep
self.session = FakeSession()
self.service = self.session.get_service("s3")
self.endpoint = self.service.get_endpoint("us-east-1")
self.files = make_loc_files()
示例5: 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()
示例6: 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
示例7: setUp
def setUp(self):
super(S3HandlerTestDelete, self).setUp()
params = {'region': 'us-east-1'}
self.s3_handler = S3Handler(self.session, params,
runtime_config=runtime_config(
max_concurrent_requests=1))
self.loc_files = make_loc_files(self.file_creator)
self.bucket = 'mybucket'
示例8: setUp
def setUp(self):
self.environ = {}
self.environ_patch = patch('os.environ', self.environ)
self.environ_patch.start()
self.mock = MagicMock()
self.mock.get_config = MagicMock(return_value={'region': None})
self.loc_files = make_loc_files()
self.bucket = 's3testbucket'
示例9: setUp
def setUp(self):
super(S3HandlerTestDeleteList, 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)
self.loc_files = make_loc_files()
示例10: setUp
def setUp(self):
self.local_file = six.text_type(os.path.abspath('.') + os.sep + 'some_directory' \
+ os.sep + 'text1.txt')
self.local_dir = six.text_type(os.path.abspath('.') + os.sep + 'some_directory' \
+ os.sep)
self.session = FakeSession()
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
self.files = make_loc_files()
示例11: setUp
def setUp(self):
self.session = botocore.session.get_session(EnvironmentVariables)
self.client = self.session.create_client('s3', 'us-west-2')
self.source_client = self.session.create_client('s3', 'us-west-2')
params = {'region': 'us-west-2'}
self.s3_handler = S3Handler(self.session, params)
self.bucket = make_s3_files(self.session)
self.file_creator = FileCreator()
self.loc_files = make_loc_files(self.file_creator)
示例12: setUp
def setUp(self):
self.environ = {}
self.environ_patch = patch("os.environ", self.environ)
self.environ_patch.start()
self.session = FakeSession()
self.mock = MagicMock()
self.mock.get_config = MagicMock(return_value={"region": None})
self.loc_files = make_loc_files()
self.bucket = make_s3_files(self.session)
示例13: setUp
def setUp(self):
super(CommandArchitectureTest, self).setUp()
self.session = self.driver.session
self.bucket = 'mybucket'
self.file_creator = FileCreator()
self.loc_files = make_loc_files(self.file_creator)
self.output = StringIO()
self.err_output = StringIO()
self.saved_stdout = sys.stdout
self.saved_stderr = sys.stderr
sys.stdout = self.output
sys.stderr = self.err_output
示例14: setUp
def setUp(self):
super(S3HandlerExceptionMultiTaskTest, self).setUp()
self.session = FakeSession(True, True)
self.service = self.session.get_service('s3')
self.endpoint = self.service.get_endpoint('us-east-1')
params = {'region': 'us-east-1', 'quiet': True}
self.s3_handler_multi = S3Handler(
self.session, params,
runtime_config=runtime_config(
multipart_threshold=10, multipart_chunksize=2))
self.bucket = create_bucket(self.session)
self.loc_files = make_loc_files()
self.s3_files = [self.bucket + '/text1.txt',
self.bucket + '/another_directory/text2.txt']
示例15: 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.s3_handler_multi = S3Handler(self.session, multi_threshold=10,
chunksize=2,
params=params)
self.bucket = create_bucket(self.session)
self.loc_files = make_loc_files()
self.s3_files = [self.bucket + '/text1.txt',
self.bucket + '/another_directory/text2.txt']
self.output = StringIO()
self.saved_stdout = sys.stdout
sys.stdout = self.output