On 7/11/19 9:28 AM, Tomas Chvatal wrote:
Looking at this it is a problem of where the darn SSL is. On SLE12 it
is still in the main package and as such the python is needed while
your build picked just python-base. If you would add BuildRequires:
python it should proceed further.
Right, I remember that problem and indeed adding "python" to BUildRequires makes
the testsuite proceed much further now. However, it still fails with errors [1]
like:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 991: ordinal not in range(128)
Adrian
[1] https://build.opensuse.org/package/show/home:glaubitz:branches:devel:languag...
[ 261s] =================================== FAILURES ===================================
[ 261s] TestImplicitApiPlugin_process_api_events.test_must_retain_side_effect_of_modifying_events
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def test_must_retain_side_effect_of_modifying_events(self):
[ 261s] """
[ 261s] It must retain any changes made to the Event dictionary by helper methods
[ 261s] """
[ 261s]
[ 261s] api_events = {
[ 261s] "Api1": {
[ 261s] "Type": "Api",
[ 261s] "Properties": {
[ 261s] "Path": "/",
[ 261s] "Method": "get"
[ 261s] }
[ 261s] },
[ 261s] "Api2": {
[ 261s] "Type": "Api",
[ 261s] "Properties": {
[ 261s] "Path": "/foo",
[ 261s] "Method": "post"
[ 261s] }
[ 261s] }
[ 261s] }
[ 261s]
[ 261s] template = Mock()
[ 261s] function = SamResource({
[ 261s] "Type": SamResourceType.Function.value,
[ 261s] "Properties": {
[ 261s] "Events": {
[ 261s] "Api1": "Intentionally setting this value to a string for testing. "
[ 261s] "This should be replaced by API Event after processing",
[ 261s]
[ 261s] "Api2": "must be replaced"
[ 261s] }
[ 261s] }
[ 261s] })
[ 261s]
[ 261s] def add_key_to_event(event_properties):
[ 261s] event_properties["Key"] = "Value"
[ 261s]
[ 261s] # Apply the side effect of adding a key to events dict
[ 261s] self.plugin._add_implicit_api_id_if_necessary.side_effect = add_key_to_event
[ 261s]
[ 261s] self.plugin._process_api_events(function, api_events, template)
[ 261s]
[ 261s] # Side effect must be visible after call returns on the input object
[ 261s] self.assertEqual(api_events["Api1"]["Properties"], {"Path": "/", "Method": "get", "Key": "Value"})
[ 261s] self.assertEqual(api_events["Api2"]["Properties"], {"Path": "/foo", "Method": "post", "Key": "Value"})
[ 261s]
[ 261s] # Every Event object inside the SamResource class must be entirely replaced by input api_events with side effect
[ 261s] self.assertEqual(function.properties["Events"]["Api1"]["Properties"], {"Path": "/", "Method": "get", "Key": "Value"})
[ 261s] self.assertEqual(function.properties["Events"]["Api2"]["Properties"], {"Path": "/foo", "Method": "post", "Key": "Value"})
[ 261s]
[ 261s] # Subsequent calls must be made with the side effect. This is important.
[ 261s] self.plugin._add_api_to_swagger.assert_has_calls([
[ 261s] call("Api1",
[ 261s] # Side effects should be visible here
[ 261s] {"Path": "/", "Method": "get", "Key": "Value"},
[ 261s] template),
[ 261s] call("Api2",
[ 261s] # Side effects should be visible here
[ 261s] {"Path": "/foo", "Method": "post", "Key": "Value"},
[ 261s] > template),
[ 261s] ])
[ 261s]
[ 261s] tests/plugins/api/test_implicit_api_plugin.py:567:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:969: in assert_has_calls
[ 261s] ), cause)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] value = None, from_value = None
[ 261s]
[ 261s] > ???
[ 261s] E AssertionError: Calls not found.
[ 261s] E Expected: [call('Api1', {'Key': 'Value', 'Path': '/', 'Method': 'get'}, <Mock id='139963827261224'>),
[ 261s] E call('Api2', {'Key': 'Value', 'Path': '/foo', 'Method': 'post'}, <Mock id='139963827261224'>)]
[ 261s] E Actual: [call('Api2', {'Key': 'Value', 'Path': '/foo', 'Method': 'post'}, <Mock id='139963827261224'>),
[ 261s] E call('Api1', {'Key': 'Value', 'Path': '/', 'Method': 'get'}, <Mock id='139963827261224'>)]
[ 261s]
[ 261s] <string>:3: AssertionError
[ 261s] ___ TestImplicitApiPlugin_process_api_events.test_must_work_with_api_events ____
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def test_must_work_with_api_events(self):
[ 261s] api_events = {
[ 261s] "Api1": {
[ 261s] "Type": "Api",
[ 261s] "Properties": {
[ 261s] "Path": "/",
[ 261s] "Method": "GET"
[ 261s] }
[ 261s] },
[ 261s] "Api2": {
[ 261s] "Type": "Api",
[ 261s] "Properties": {
[ 261s] "Path": "/foo",
[ 261s] "Method": "POST"
[ 261s] }
[ 261s] }
[ 261s] }
[ 261s]
[ 261s] template = Mock()
[ 261s] function_events_mock = Mock()
[ 261s] function = SamResource({
[ 261s] "Type": SamResourceType.Function.value,
[ 261s] "Properties": {
[ 261s] "Events": function_events_mock
[ 261s] }
[ 261s] })
[ 261s] function_events_mock.update = Mock()
[ 261s]
[ 261s] self.plugin._process_api_events(function, api_events, template)
[ 261s]
[ 261s] self.plugin._add_implicit_api_id_if_necessary.assert_has_calls([
[ 261s] call({"Path": "/", "Method": "GET"}),
[ 261s] > call({"Path": "/foo", "Method": "POST"}),
[ 261s] ])
[ 261s]
[ 261s] tests/plugins/api/test_implicit_api_plugin.py:391:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:969: in assert_has_calls
[ 261s] ), cause)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] value = None, from_value = None
[ 261s]
[ 261s] > ???
[ 261s] E AssertionError: Calls not found.
[ 261s] E Expected: [call({'Path': '/', 'Method': 'GET'}),
[ 261s] E call({'Path': '/foo', 'Method': 'POST'})]
[ 261s] E Actual: [call({'Path': '/foo', 'Method': 'POST'}),
[ 261s] E call({'Path': '/', 'Method': 'GET'})]
[ 261s]
[ 261s] <string>:3: AssertionError
[ 261s] __________ TestSamTemplate.test_iterate_must_filter_by_resource_type ___________
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def test_iterate_must_filter_by_resource_type(self):
[ 261s]
[ 261s] template = SamTemplate(self.template_dict)
[ 261s]
[ 261s] type = "AWS::Serverless::Function"
[ 261s] expected = [
[ 261s] ("Function1", {"Type": "AWS::Serverless::Function", "DependsOn": "SomeOtherResource", "Properties": {}}),
[ 261s] ("Function2", {"Type": "AWS::Serverless::Function", "a": "b", "Properties": {}}),
[ 261s] ]
[ 261s]
[ 261s] actual = [(id, resource.to_dict()) for id, resource in template.iterate(type)]
[ 261s] > self.assertEqual(expected, actual)
[ 261s] E AssertionError: Lists differ: [('Function1', {'DependsOn': 'SomeOtherResource', 'P[131 chars]n'})] != [('Function2', {'Properties': {}, 'a': 'b', 'Type': [131 chars]n'})]
[ 261s] E
[ 261s] E First differing element 0:
[ 261s] E ('Function1', {'DependsOn': 'SomeOtherResource', 'Properties': {}, 'Type': 'AWS::Serverless::Function'})
[ 261s] E ('Function2', {'Properties': {}, 'a': 'b', 'Type': 'AWS::Serverless::Function'})
[ 261s] E
[ 261s] E - [('Function1',
[ 261s] E ? ^
[ 261s] E
[ 261s] E + [('Function2',
[ 261s] E ? ^
[ 261s] E
[ 261s] E + {'Properties': {}, 'Type': 'AWS::Serverless::Function', 'a': 'b'}),
[ 261s] E + ('Function1',
[ 261s] E {'DependsOn': 'SomeOtherResource',
[ 261s] E 'Properties': {},
[ 261s] E - 'Type': 'AWS::Serverless::Function'}),
[ 261s] E ? ^
[ 261s] E
[ 261s] E + 'Type': 'AWS::Serverless::Function'})]
[ 261s] E ? ^
[ 261s] E
[ 261s] E - ('Function2',
[ 261s] E - {'Properties': {}, 'Type': 'AWS::Serverless::Function', 'a': 'b'})]
[ 261s]
[ 261s] tests/sdk/test_template.py:63: AssertionError
[ 261s] TestTranslatorEndToEnd.test_transform_success_285_implicit_api_with_many_conditions
[ 261s]
[ 261s] args = (, 'implicit_api_with_many_conditions', ('aws', 'ap-southeast-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] > return func(*args, **keywargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] testcase = 'implicit_api_with_many_conditions'
[ 261s] partition_with_region = ('aws', 'ap-southeast-1')
[ 261s]
[ 261s] @parameterized.expand(
[ 261s] itertools.product([
[ 261s] 's3_with_condition',
[ 261s] 'function_with_condition',
[ 261s] 'basic_function',
[ 261s] 'basic_application',
[ 261s] 'application_preparing_state',
[ 261s] 'application_with_intrinsics',
[ 261s] 'basic_layer',
[ 261s] 'cloudwatchevent',
[ 261s] 'cloudwatch_logs_with_ref',
[ 261s] 'cloudwatchlog',
[ 261s] 'streams',
[ 261s] 'sqs',
[ 261s] 'simpletable',
[ 261s] 'simpletable_with_sse',
[ 261s] 'implicit_api',
[ 261s] 'explicit_api',
[ 261s] 'api_endpoint_configuration',
[ 261s] 'api_with_auth_all_maximum',
[ 261s] 'api_with_auth_all_minimum',
[ 261s] 'api_with_auth_no_default',
[ 261s] 'api_with_default_aws_iam_auth',
[ 261s] 'api_with_method_aws_iam_auth',
[ 261s] 'api_with_aws_iam_auth_overrides',
[ 261s] 'api_with_method_settings',
[ 261s] 'api_with_binary_media_types',
[ 261s] 'api_with_minimum_compression_size',
[ 261s] 'api_with_resource_refs',
[ 261s] 'api_with_cors',
[ 261s] 'api_with_cors_and_only_methods',
[ 261s] 'api_with_cors_and_only_headers',
[ 261s] 'api_with_cors_and_only_origins',
[ 261s] 'api_with_cors_and_only_maxage',
[ 261s] 'api_with_cors_and_only_credentials_false',
[ 261s] 'api_with_cors_no_definitionbody',
[ 261s] 'api_with_gateway_responses',
[ 261s] 'api_with_gateway_responses_all',
[ 261s] 'api_with_gateway_responses_minimal',
[ 261s] 'api_with_gateway_responses_implicit',
[ 261s] 'api_with_gateway_responses_string_status_code',
[ 261s] 'api_cache',
[ 261s] 'api_with_access_log_setting',
[ 261s] 'api_with_canary_setting',
[ 261s] 'api_with_xray_tracing',
[ 261s] 's3',
[ 261s] 's3_create_remove',
[ 261s] 's3_existing_lambda_notification_configuration',
[ 261s] 's3_existing_other_notification_configuration',
[ 261s] 's3_filter',
[ 261s] 's3_multiple_events_same_bucket',
[ 261s] 's3_multiple_functions',
[ 261s] 's3_with_dependsOn',
[ 261s] 'sns',
[ 261s] 'sns_existing_other_subscription',
[ 261s] 'sns_topic_outside_template',
[ 261s] 'alexa_skill',
[ 261s] 'alexa_skill_with_skill_id',
[ 261s] 'iot_rule',
[ 261s] 'layers_with_intrinsics',
[ 261s] 'layers_all_properties',
[ 261s] 'function_managed_inline_policy',
[ 261s] 'unsupported_resources',
[ 261s] 'intrinsic_functions',
[ 261s] 'basic_function_with_tags',
[ 261s] 'depends_on',
[ 261s] 'function_event_conditions',
[ 261s] 'function_with_dlq',
[ 261s] 'function_with_kmskeyarn',
[ 261s] 'function_with_alias',
[ 261s] 'function_with_alias_intrinsics',
[ 261s] 'function_with_disabled_deployment_preference',
[ 261s] 'function_with_deployment_preference',
[ 261s] 'function_with_deployment_preference_all_parameters',
[ 261s] 'function_with_deployment_preference_multiple_combinations',
[ 261s] 'function_with_alias_and_event_sources',
[ 261s] 'function_with_resource_refs',
[ 261s] 'function_with_deployment_and_custom_role',
[ 261s] 'function_with_deployment_no_service_role',
[ 261s] 'function_with_global_layers',
[ 261s] 'function_with_layers',
[ 261s] 'function_with_many_layers',
[ 261s] 'function_with_permissions_boundary',
[ 261s] 'function_with_policy_templates',
[ 261s] 'function_with_sns_event_source_all_parameters',
[ 261s] 'globals_for_function',
[ 261s] 'globals_for_api',
[ 261s] 'globals_for_simpletable',
[ 261s] 'all_policy_templates',
[ 261s] 'simple_table_ref_parameter_intrinsic',
[ 261s] 'simple_table_with_table_name',
[ 261s] 'function_concurrency',
[ 261s] 'simple_table_with_extra_tags',
[ 261s] 'explicit_api_with_invalid_events_config',
[ 261s] 'no_implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_auth_and_conditions_max',
[ 261s] 'implicit_api_with_many_conditions',
[ 261s] 'implicit_and_explicit_api_with_conditions',
[ 261s] 'api_with_cors_and_conditions_no_definitionbody',
[ 261s] 'api_with_auth_and_conditions_all_max'
[ 261s] ],
[ 261s] [
[ 261s] ("aws", "ap-southeast-1"),
[ 261s] ("aws-cn", "cn-north-1"),
[ 261s] ("aws-us-gov", "us-gov-west-1")
[ 261s] ] # Run all the above tests against each of the list of partitions to test against
[ 261s] )
[ 261s] )
[ 261s] @patch('samtranslator.plugins.application.serverless_app_plugin.ServerlessAppPlugin._sar_service_call', mock_sar_service_call)
[ 261s] @patch('botocore.client.ClientEndpointBridge._check_default_region', mock_get_region)
[ 261s] def test_transform_success(self, testcase, partition_with_region):
[ 261s] partition = partition_with_region[0]
[ 261s] region = partition_with_region[1]
[ 261s]
[ 261s] > manifest = yaml_parse(open(os.path.join(INPUT_FOLDER, testcase + '.yaml'), 'r'))
[ 261s]
[ 261s] tests/translator/test_translator.py:253:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] yamlstr = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def yaml_parse(yamlstr):
[ 261s] """Parse a yaml string"""
[ 261s] yaml.SafeLoader.add_multi_constructor(
[ 261s] "!", intrinsics_multi_constructor)
[ 261s] > return yaml.safe_load(yamlstr)
[ 261s]
[ 261s] samtranslator/yaml_helper.py:13:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def safe_load(stream):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s]
[ 261s] Resolve only basic YAML tags. This is known
[ 261s] to be safe for untrusted input.
[ 261s] """
[ 261s] > return load(stream, SafeLoader)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:162:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s] Loader =
[ 261s]
[ 261s] def load(stream, Loader=None):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s] """
[ 261s] if Loader is None:
[ 261s] load_warning('load')
[ 261s] Loader = FullLoader
[ 261s]
[ 261s] > loader = Loader(stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:112:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] > Reader.__init__(self, stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/loader.py:34:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] self.name = None
[ 261s] self.stream = None
[ 261s] self.stream_pointer = 0
[ 261s] self.eof = True
[ 261s] self.buffer = ''
[ 261s] self.pointer = 0
[ 261s] self.raw_buffer = None
[ 261s] self.raw_decode = None
[ 261s] self.encoding = None
[ 261s] self.index = 0
[ 261s] self.line = 0
[ 261s] self.column = 0
[ 261s] if isinstance(stream, str):
[ 261s] self.name = "<unicode string>"
[ 261s] self.check_printable(stream)
[ 261s] self.buffer = stream+'\0'
[ 261s] elif isinstance(stream, bytes):
[ 261s] self.name = "<byte string>"
[ 261s] self.raw_buffer = stream
[ 261s] self.determine_encoding()
[ 261s] else:
[ 261s] self.stream = stream
[ 261s] self.name = getattr(stream, 'name', "<file>")
[ 261s] self.eof = False
[ 261s] self.raw_buffer = None
[ 261s] > self.determine_encoding()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:85:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def determine_encoding(self):
[ 261s] while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
[ 261s] > self.update_raw()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:124:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self = , size = 4096
[ 261s]
[ 261s] def update_raw(self, size=4096):
[ 261s] > data = self.stream.read(size)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:178:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] input = b"AWSTemplateFormatVersion: '2010-09-09'\nTransform: 'AWS::Serverless-2016-10-31'\nDescription: A template to test for...:\n ApiEvent:\n Type: Api\n Properties:\n Path: /sub9\n Method: post \n"
[ 261s] final = False
[ 261s]
[ 261s] def decode(self, input, final=False):
[ 261s] > return codecs.ascii_decode(input, self.errors)[0]
[ 261s] E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 991: ordinal not in range(128)
[ 261s]
[ 261s] /usr/lib64/python3.4/encodings/ascii.py:26: UnicodeDecodeError
[ 261s]
[ 261s] During handling of the above exception, another exception occurred:
[ 261s]
[ 261s] a = (,)
[ 261s]
[ 261s] @wraps(func)
[ 261s] def standalone_func(*a):
[ 261s] > return func(*(a + p.args), **p.kwargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:518:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305: in patched
[ 261s] return func(*args, **keywargs)
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:71: in dummy_func
[ 261s] return orgfunc(*args, **kwargs)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] args = (, 'implicit_api_with_many_conditions', ('aws', 'ap-southeast-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] return func(*args, **keywargs)
[ 261s] except:
[ 261s] > if (patching not in entered_patchers and
[ 261s] _is_started(patching)):
[ 261s] E UnboundLocalError: local variable 'patching' referenced before assignment
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1307: UnboundLocalError
[ 261s] TestTranslatorEndToEnd.test_transform_success_286_implicit_api_with_many_conditions
[ 261s]
[ 261s] args = (, 'implicit_api_with_many_conditions', ('aws-cn', 'cn-north-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] > return func(*args, **keywargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] testcase = 'implicit_api_with_many_conditions'
[ 261s] partition_with_region = ('aws-cn', 'cn-north-1')
[ 261s]
[ 261s] @parameterized.expand(
[ 261s] itertools.product([
[ 261s] 's3_with_condition',
[ 261s] 'function_with_condition',
[ 261s] 'basic_function',
[ 261s] 'basic_application',
[ 261s] 'application_preparing_state',
[ 261s] 'application_with_intrinsics',
[ 261s] 'basic_layer',
[ 261s] 'cloudwatchevent',
[ 261s] 'cloudwatch_logs_with_ref',
[ 261s] 'cloudwatchlog',
[ 261s] 'streams',
[ 261s] 'sqs',
[ 261s] 'simpletable',
[ 261s] 'simpletable_with_sse',
[ 261s] 'implicit_api',
[ 261s] 'explicit_api',
[ 261s] 'api_endpoint_configuration',
[ 261s] 'api_with_auth_all_maximum',
[ 261s] 'api_with_auth_all_minimum',
[ 261s] 'api_with_auth_no_default',
[ 261s] 'api_with_default_aws_iam_auth',
[ 261s] 'api_with_method_aws_iam_auth',
[ 261s] 'api_with_aws_iam_auth_overrides',
[ 261s] 'api_with_method_settings',
[ 261s] 'api_with_binary_media_types',
[ 261s] 'api_with_minimum_compression_size',
[ 261s] 'api_with_resource_refs',
[ 261s] 'api_with_cors',
[ 261s] 'api_with_cors_and_only_methods',
[ 261s] 'api_with_cors_and_only_headers',
[ 261s] 'api_with_cors_and_only_origins',
[ 261s] 'api_with_cors_and_only_maxage',
[ 261s] 'api_with_cors_and_only_credentials_false',
[ 261s] 'api_with_cors_no_definitionbody',
[ 261s] 'api_with_gateway_responses',
[ 261s] 'api_with_gateway_responses_all',
[ 261s] 'api_with_gateway_responses_minimal',
[ 261s] 'api_with_gateway_responses_implicit',
[ 261s] 'api_with_gateway_responses_string_status_code',
[ 261s] 'api_cache',
[ 261s] 'api_with_access_log_setting',
[ 261s] 'api_with_canary_setting',
[ 261s] 'api_with_xray_tracing',
[ 261s] 's3',
[ 261s] 's3_create_remove',
[ 261s] 's3_existing_lambda_notification_configuration',
[ 261s] 's3_existing_other_notification_configuration',
[ 261s] 's3_filter',
[ 261s] 's3_multiple_events_same_bucket',
[ 261s] 's3_multiple_functions',
[ 261s] 's3_with_dependsOn',
[ 261s] 'sns',
[ 261s] 'sns_existing_other_subscription',
[ 261s] 'sns_topic_outside_template',
[ 261s] 'alexa_skill',
[ 261s] 'alexa_skill_with_skill_id',
[ 261s] 'iot_rule',
[ 261s] 'layers_with_intrinsics',
[ 261s] 'layers_all_properties',
[ 261s] 'function_managed_inline_policy',
[ 261s] 'unsupported_resources',
[ 261s] 'intrinsic_functions',
[ 261s] 'basic_function_with_tags',
[ 261s] 'depends_on',
[ 261s] 'function_event_conditions',
[ 261s] 'function_with_dlq',
[ 261s] 'function_with_kmskeyarn',
[ 261s] 'function_with_alias',
[ 261s] 'function_with_alias_intrinsics',
[ 261s] 'function_with_disabled_deployment_preference',
[ 261s] 'function_with_deployment_preference',
[ 261s] 'function_with_deployment_preference_all_parameters',
[ 261s] 'function_with_deployment_preference_multiple_combinations',
[ 261s] 'function_with_alias_and_event_sources',
[ 261s] 'function_with_resource_refs',
[ 261s] 'function_with_deployment_and_custom_role',
[ 261s] 'function_with_deployment_no_service_role',
[ 261s] 'function_with_global_layers',
[ 261s] 'function_with_layers',
[ 261s] 'function_with_many_layers',
[ 261s] 'function_with_permissions_boundary',
[ 261s] 'function_with_policy_templates',
[ 261s] 'function_with_sns_event_source_all_parameters',
[ 261s] 'globals_for_function',
[ 261s] 'globals_for_api',
[ 261s] 'globals_for_simpletable',
[ 261s] 'all_policy_templates',
[ 261s] 'simple_table_ref_parameter_intrinsic',
[ 261s] 'simple_table_with_table_name',
[ 261s] 'function_concurrency',
[ 261s] 'simple_table_with_extra_tags',
[ 261s] 'explicit_api_with_invalid_events_config',
[ 261s] 'no_implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_auth_and_conditions_max',
[ 261s] 'implicit_api_with_many_conditions',
[ 261s] 'implicit_and_explicit_api_with_conditions',
[ 261s] 'api_with_cors_and_conditions_no_definitionbody',
[ 261s] 'api_with_auth_and_conditions_all_max'
[ 261s] ],
[ 261s] [
[ 261s] ("aws", "ap-southeast-1"),
[ 261s] ("aws-cn", "cn-north-1"),
[ 261s] ("aws-us-gov", "us-gov-west-1")
[ 261s] ] # Run all the above tests against each of the list of partitions to test against
[ 261s] )
[ 261s] )
[ 261s] @patch('samtranslator.plugins.application.serverless_app_plugin.ServerlessAppPlugin._sar_service_call', mock_sar_service_call)
[ 261s] @patch('botocore.client.ClientEndpointBridge._check_default_region', mock_get_region)
[ 261s] def test_transform_success(self, testcase, partition_with_region):
[ 261s] partition = partition_with_region[0]
[ 261s] region = partition_with_region[1]
[ 261s]
[ 261s] > manifest = yaml_parse(open(os.path.join(INPUT_FOLDER, testcase + '.yaml'), 'r'))
[ 261s]
[ 261s] tests/translator/test_translator.py:253:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] yamlstr = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def yaml_parse(yamlstr):
[ 261s] """Parse a yaml string"""
[ 261s] yaml.SafeLoader.add_multi_constructor(
[ 261s] "!", intrinsics_multi_constructor)
[ 261s] > return yaml.safe_load(yamlstr)
[ 261s]
[ 261s] samtranslator/yaml_helper.py:13:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def safe_load(stream):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s]
[ 261s] Resolve only basic YAML tags. This is known
[ 261s] to be safe for untrusted input.
[ 261s] """
[ 261s] > return load(stream, SafeLoader)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:162:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s] Loader =
[ 261s]
[ 261s] def load(stream, Loader=None):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s] """
[ 261s] if Loader is None:
[ 261s] load_warning('load')
[ 261s] Loader = FullLoader
[ 261s]
[ 261s] > loader = Loader(stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:112:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] > Reader.__init__(self, stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/loader.py:34:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] self.name = None
[ 261s] self.stream = None
[ 261s] self.stream_pointer = 0
[ 261s] self.eof = True
[ 261s] self.buffer = ''
[ 261s] self.pointer = 0
[ 261s] self.raw_buffer = None
[ 261s] self.raw_decode = None
[ 261s] self.encoding = None
[ 261s] self.index = 0
[ 261s] self.line = 0
[ 261s] self.column = 0
[ 261s] if isinstance(stream, str):
[ 261s] self.name = "<unicode string>"
[ 261s] self.check_printable(stream)
[ 261s] self.buffer = stream+'\0'
[ 261s] elif isinstance(stream, bytes):
[ 261s] self.name = "<byte string>"
[ 261s] self.raw_buffer = stream
[ 261s] self.determine_encoding()
[ 261s] else:
[ 261s] self.stream = stream
[ 261s] self.name = getattr(stream, 'name', "<file>")
[ 261s] self.eof = False
[ 261s] self.raw_buffer = None
[ 261s] > self.determine_encoding()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:85:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def determine_encoding(self):
[ 261s] while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
[ 261s] > self.update_raw()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:124:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self = , size = 4096
[ 261s]
[ 261s] def update_raw(self, size=4096):
[ 261s] > data = self.stream.read(size)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:178:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] input = b"AWSTemplateFormatVersion: '2010-09-09'\nTransform: 'AWS::Serverless-2016-10-31'\nDescription: A template to test for...:\n ApiEvent:\n Type: Api\n Properties:\n Path: /sub9\n Method: post \n"
[ 261s] final = False
[ 261s]
[ 261s] def decode(self, input, final=False):
[ 261s] > return codecs.ascii_decode(input, self.errors)[0]
[ 261s] E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 991: ordinal not in range(128)
[ 261s]
[ 261s] /usr/lib64/python3.4/encodings/ascii.py:26: UnicodeDecodeError
[ 261s]
[ 261s] During handling of the above exception, another exception occurred:
[ 261s]
[ 261s] a = (,)
[ 261s]
[ 261s] @wraps(func)
[ 261s] def standalone_func(*a):
[ 261s] > return func(*(a + p.args), **p.kwargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:518:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305: in patched
[ 261s] return func(*args, **keywargs)
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:71: in dummy_func
[ 261s] return orgfunc(*args, **kwargs)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] args = (, 'implicit_api_with_many_conditions', ('aws-cn', 'cn-north-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] return func(*args, **keywargs)
[ 261s] except:
[ 261s] > if (patching not in entered_patchers and
[ 261s] _is_started(patching)):
[ 261s] E UnboundLocalError: local variable 'patching' referenced before assignment
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1307: UnboundLocalError
[ 261s] TestTranslatorEndToEnd.test_transform_success_287_implicit_api_with_many_conditions
[ 261s]
[ 261s] args = (, 'implicit_api_with_many_conditions', ('aws-us-gov', 'us-gov-west-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] > return func(*args, **keywargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] testcase = 'implicit_api_with_many_conditions'
[ 261s] partition_with_region = ('aws-us-gov', 'us-gov-west-1')
[ 261s]
[ 261s] @parameterized.expand(
[ 261s] itertools.product([
[ 261s] 's3_with_condition',
[ 261s] 'function_with_condition',
[ 261s] 'basic_function',
[ 261s] 'basic_application',
[ 261s] 'application_preparing_state',
[ 261s] 'application_with_intrinsics',
[ 261s] 'basic_layer',
[ 261s] 'cloudwatchevent',
[ 261s] 'cloudwatch_logs_with_ref',
[ 261s] 'cloudwatchlog',
[ 261s] 'streams',
[ 261s] 'sqs',
[ 261s] 'simpletable',
[ 261s] 'simpletable_with_sse',
[ 261s] 'implicit_api',
[ 261s] 'explicit_api',
[ 261s] 'api_endpoint_configuration',
[ 261s] 'api_with_auth_all_maximum',
[ 261s] 'api_with_auth_all_minimum',
[ 261s] 'api_with_auth_no_default',
[ 261s] 'api_with_default_aws_iam_auth',
[ 261s] 'api_with_method_aws_iam_auth',
[ 261s] 'api_with_aws_iam_auth_overrides',
[ 261s] 'api_with_method_settings',
[ 261s] 'api_with_binary_media_types',
[ 261s] 'api_with_minimum_compression_size',
[ 261s] 'api_with_resource_refs',
[ 261s] 'api_with_cors',
[ 261s] 'api_with_cors_and_only_methods',
[ 261s] 'api_with_cors_and_only_headers',
[ 261s] 'api_with_cors_and_only_origins',
[ 261s] 'api_with_cors_and_only_maxage',
[ 261s] 'api_with_cors_and_only_credentials_false',
[ 261s] 'api_with_cors_no_definitionbody',
[ 261s] 'api_with_gateway_responses',
[ 261s] 'api_with_gateway_responses_all',
[ 261s] 'api_with_gateway_responses_minimal',
[ 261s] 'api_with_gateway_responses_implicit',
[ 261s] 'api_with_gateway_responses_string_status_code',
[ 261s] 'api_cache',
[ 261s] 'api_with_access_log_setting',
[ 261s] 'api_with_canary_setting',
[ 261s] 'api_with_xray_tracing',
[ 261s] 's3',
[ 261s] 's3_create_remove',
[ 261s] 's3_existing_lambda_notification_configuration',
[ 261s] 's3_existing_other_notification_configuration',
[ 261s] 's3_filter',
[ 261s] 's3_multiple_events_same_bucket',
[ 261s] 's3_multiple_functions',
[ 261s] 's3_with_dependsOn',
[ 261s] 'sns',
[ 261s] 'sns_existing_other_subscription',
[ 261s] 'sns_topic_outside_template',
[ 261s] 'alexa_skill',
[ 261s] 'alexa_skill_with_skill_id',
[ 261s] 'iot_rule',
[ 261s] 'layers_with_intrinsics',
[ 261s] 'layers_all_properties',
[ 261s] 'function_managed_inline_policy',
[ 261s] 'unsupported_resources',
[ 261s] 'intrinsic_functions',
[ 261s] 'basic_function_with_tags',
[ 261s] 'depends_on',
[ 261s] 'function_event_conditions',
[ 261s] 'function_with_dlq',
[ 261s] 'function_with_kmskeyarn',
[ 261s] 'function_with_alias',
[ 261s] 'function_with_alias_intrinsics',
[ 261s] 'function_with_disabled_deployment_preference',
[ 261s] 'function_with_deployment_preference',
[ 261s] 'function_with_deployment_preference_all_parameters',
[ 261s] 'function_with_deployment_preference_multiple_combinations',
[ 261s] 'function_with_alias_and_event_sources',
[ 261s] 'function_with_resource_refs',
[ 261s] 'function_with_deployment_and_custom_role',
[ 261s] 'function_with_deployment_no_service_role',
[ 261s] 'function_with_global_layers',
[ 261s] 'function_with_layers',
[ 261s] 'function_with_many_layers',
[ 261s] 'function_with_permissions_boundary',
[ 261s] 'function_with_policy_templates',
[ 261s] 'function_with_sns_event_source_all_parameters',
[ 261s] 'globals_for_function',
[ 261s] 'globals_for_api',
[ 261s] 'globals_for_simpletable',
[ 261s] 'all_policy_templates',
[ 261s] 'simple_table_ref_parameter_intrinsic',
[ 261s] 'simple_table_with_table_name',
[ 261s] 'function_concurrency',
[ 261s] 'simple_table_with_extra_tags',
[ 261s] 'explicit_api_with_invalid_events_config',
[ 261s] 'no_implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_auth_and_conditions_max',
[ 261s] 'implicit_api_with_many_conditions',
[ 261s] 'implicit_and_explicit_api_with_conditions',
[ 261s] 'api_with_cors_and_conditions_no_definitionbody',
[ 261s] 'api_with_auth_and_conditions_all_max'
[ 261s] ],
[ 261s] [
[ 261s] ("aws", "ap-southeast-1"),
[ 261s] ("aws-cn", "cn-north-1"),
[ 261s] ("aws-us-gov", "us-gov-west-1")
[ 261s] ] # Run all the above tests against each of the list of partitions to test against
[ 261s] )
[ 261s] )
[ 261s] @patch('samtranslator.plugins.application.serverless_app_plugin.ServerlessAppPlugin._sar_service_call', mock_sar_service_call)
[ 261s] @patch('botocore.client.ClientEndpointBridge._check_default_region', mock_get_region)
[ 261s] def test_transform_success(self, testcase, partition_with_region):
[ 261s] partition = partition_with_region[0]
[ 261s] region = partition_with_region[1]
[ 261s]
[ 261s] > manifest = yaml_parse(open(os.path.join(INPUT_FOLDER, testcase + '.yaml'), 'r'))
[ 261s]
[ 261s] tests/translator/test_translator.py:253:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] yamlstr = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def yaml_parse(yamlstr):
[ 261s] """Parse a yaml string"""
[ 261s] yaml.SafeLoader.add_multi_constructor(
[ 261s] "!", intrinsics_multi_constructor)
[ 261s] > return yaml.safe_load(yamlstr)
[ 261s]
[ 261s] samtranslator/yaml_helper.py:13:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def safe_load(stream):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s]
[ 261s] Resolve only basic YAML tags. This is known
[ 261s] to be safe for untrusted input.
[ 261s] """
[ 261s] > return load(stream, SafeLoader)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:162:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s] Loader =
[ 261s]
[ 261s] def load(stream, Loader=None):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s] """
[ 261s] if Loader is None:
[ 261s] load_warning('load')
[ 261s] Loader = FullLoader
[ 261s]
[ 261s] > loader = Loader(stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:112:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] > Reader.__init__(self, stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/loader.py:34:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_api_with_many_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] self.name = None
[ 261s] self.stream = None
[ 261s] self.stream_pointer = 0
[ 261s] self.eof = True
[ 261s] self.buffer = ''
[ 261s] self.pointer = 0
[ 261s] self.raw_buffer = None
[ 261s] self.raw_decode = None
[ 261s] self.encoding = None
[ 261s] self.index = 0
[ 261s] self.line = 0
[ 261s] self.column = 0
[ 261s] if isinstance(stream, str):
[ 261s] self.name = "<unicode string>"
[ 261s] self.check_printable(stream)
[ 261s] self.buffer = stream+'\0'
[ 261s] elif isinstance(stream, bytes):
[ 261s] self.name = "<byte string>"
[ 261s] self.raw_buffer = stream
[ 261s] self.determine_encoding()
[ 261s] else:
[ 261s] self.stream = stream
[ 261s] self.name = getattr(stream, 'name', "<file>")
[ 261s] self.eof = False
[ 261s] self.raw_buffer = None
[ 261s] > self.determine_encoding()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:85:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def determine_encoding(self):
[ 261s] while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
[ 261s] > self.update_raw()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:124:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self = , size = 4096
[ 261s]
[ 261s] def update_raw(self, size=4096):
[ 261s] > data = self.stream.read(size)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:178:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] input = b"AWSTemplateFormatVersion: '2010-09-09'\nTransform: 'AWS::Serverless-2016-10-31'\nDescription: A template to test for...:\n ApiEvent:\n Type: Api\n Properties:\n Path: /sub9\n Method: post \n"
[ 261s] final = False
[ 261s]
[ 261s] def decode(self, input, final=False):
[ 261s] > return codecs.ascii_decode(input, self.errors)[0]
[ 261s] E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 991: ordinal not in range(128)
[ 261s]
[ 261s] /usr/lib64/python3.4/encodings/ascii.py:26: UnicodeDecodeError
[ 261s]
[ 261s] During handling of the above exception, another exception occurred:
[ 261s]
[ 261s] a = (,)
[ 261s]
[ 261s] @wraps(func)
[ 261s] def standalone_func(*a):
[ 261s] > return func(*(a + p.args), **p.kwargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:518:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305: in patched
[ 261s] return func(*args, **keywargs)
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:71: in dummy_func
[ 261s] return orgfunc(*args, **kwargs)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] args = (, 'implicit_api_with_many_conditions', ('aws-us-gov', 'us-gov-west-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] return func(*args, **keywargs)
[ 261s] except:
[ 261s] > if (patching not in entered_patchers and
[ 261s] _is_started(patching)):
[ 261s] E UnboundLocalError: local variable 'patching' referenced before assignment
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1307: UnboundLocalError
[ 261s] TestTranslatorEndToEnd.test_transform_success_288_implicit_and_explicit_api_with_conditions
[ 261s]
[ 261s] args = (, 'implicit_and_explicit_api_with_conditions', ('aws', 'ap-southeast-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] > return func(*args, **keywargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] testcase = 'implicit_and_explicit_api_with_conditions'
[ 261s] partition_with_region = ('aws', 'ap-southeast-1')
[ 261s]
[ 261s] @parameterized.expand(
[ 261s] itertools.product([
[ 261s] 's3_with_condition',
[ 261s] 'function_with_condition',
[ 261s] 'basic_function',
[ 261s] 'basic_application',
[ 261s] 'application_preparing_state',
[ 261s] 'application_with_intrinsics',
[ 261s] 'basic_layer',
[ 261s] 'cloudwatchevent',
[ 261s] 'cloudwatch_logs_with_ref',
[ 261s] 'cloudwatchlog',
[ 261s] 'streams',
[ 261s] 'sqs',
[ 261s] 'simpletable',
[ 261s] 'simpletable_with_sse',
[ 261s] 'implicit_api',
[ 261s] 'explicit_api',
[ 261s] 'api_endpoint_configuration',
[ 261s] 'api_with_auth_all_maximum',
[ 261s] 'api_with_auth_all_minimum',
[ 261s] 'api_with_auth_no_default',
[ 261s] 'api_with_default_aws_iam_auth',
[ 261s] 'api_with_method_aws_iam_auth',
[ 261s] 'api_with_aws_iam_auth_overrides',
[ 261s] 'api_with_method_settings',
[ 261s] 'api_with_binary_media_types',
[ 261s] 'api_with_minimum_compression_size',
[ 261s] 'api_with_resource_refs',
[ 261s] 'api_with_cors',
[ 261s] 'api_with_cors_and_only_methods',
[ 261s] 'api_with_cors_and_only_headers',
[ 261s] 'api_with_cors_and_only_origins',
[ 261s] 'api_with_cors_and_only_maxage',
[ 261s] 'api_with_cors_and_only_credentials_false',
[ 261s] 'api_with_cors_no_definitionbody',
[ 261s] 'api_with_gateway_responses',
[ 261s] 'api_with_gateway_responses_all',
[ 261s] 'api_with_gateway_responses_minimal',
[ 261s] 'api_with_gateway_responses_implicit',
[ 261s] 'api_with_gateway_responses_string_status_code',
[ 261s] 'api_cache',
[ 261s] 'api_with_access_log_setting',
[ 261s] 'api_with_canary_setting',
[ 261s] 'api_with_xray_tracing',
[ 261s] 's3',
[ 261s] 's3_create_remove',
[ 261s] 's3_existing_lambda_notification_configuration',
[ 261s] 's3_existing_other_notification_configuration',
[ 261s] 's3_filter',
[ 261s] 's3_multiple_events_same_bucket',
[ 261s] 's3_multiple_functions',
[ 261s] 's3_with_dependsOn',
[ 261s] 'sns',
[ 261s] 'sns_existing_other_subscription',
[ 261s] 'sns_topic_outside_template',
[ 261s] 'alexa_skill',
[ 261s] 'alexa_skill_with_skill_id',
[ 261s] 'iot_rule',
[ 261s] 'layers_with_intrinsics',
[ 261s] 'layers_all_properties',
[ 261s] 'function_managed_inline_policy',
[ 261s] 'unsupported_resources',
[ 261s] 'intrinsic_functions',
[ 261s] 'basic_function_with_tags',
[ 261s] 'depends_on',
[ 261s] 'function_event_conditions',
[ 261s] 'function_with_dlq',
[ 261s] 'function_with_kmskeyarn',
[ 261s] 'function_with_alias',
[ 261s] 'function_with_alias_intrinsics',
[ 261s] 'function_with_disabled_deployment_preference',
[ 261s] 'function_with_deployment_preference',
[ 261s] 'function_with_deployment_preference_all_parameters',
[ 261s] 'function_with_deployment_preference_multiple_combinations',
[ 261s] 'function_with_alias_and_event_sources',
[ 261s] 'function_with_resource_refs',
[ 261s] 'function_with_deployment_and_custom_role',
[ 261s] 'function_with_deployment_no_service_role',
[ 261s] 'function_with_global_layers',
[ 261s] 'function_with_layers',
[ 261s] 'function_with_many_layers',
[ 261s] 'function_with_permissions_boundary',
[ 261s] 'function_with_policy_templates',
[ 261s] 'function_with_sns_event_source_all_parameters',
[ 261s] 'globals_for_function',
[ 261s] 'globals_for_api',
[ 261s] 'globals_for_simpletable',
[ 261s] 'all_policy_templates',
[ 261s] 'simple_table_ref_parameter_intrinsic',
[ 261s] 'simple_table_with_table_name',
[ 261s] 'function_concurrency',
[ 261s] 'simple_table_with_extra_tags',
[ 261s] 'explicit_api_with_invalid_events_config',
[ 261s] 'no_implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_auth_and_conditions_max',
[ 261s] 'implicit_api_with_many_conditions',
[ 261s] 'implicit_and_explicit_api_with_conditions',
[ 261s] 'api_with_cors_and_conditions_no_definitionbody',
[ 261s] 'api_with_auth_and_conditions_all_max'
[ 261s] ],
[ 261s] [
[ 261s] ("aws", "ap-southeast-1"),
[ 261s] ("aws-cn", "cn-north-1"),
[ 261s] ("aws-us-gov", "us-gov-west-1")
[ 261s] ] # Run all the above tests against each of the list of partitions to test against
[ 261s] )
[ 261s] )
[ 261s] @patch('samtranslator.plugins.application.serverless_app_plugin.ServerlessAppPlugin._sar_service_call', mock_sar_service_call)
[ 261s] @patch('botocore.client.ClientEndpointBridge._check_default_region', mock_get_region)
[ 261s] def test_transform_success(self, testcase, partition_with_region):
[ 261s] partition = partition_with_region[0]
[ 261s] region = partition_with_region[1]
[ 261s]
[ 261s] > manifest = yaml_parse(open(os.path.join(INPUT_FOLDER, testcase + '.yaml'), 'r'))
[ 261s]
[ 261s] tests/translator/test_translator.py:253:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] yamlstr = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def yaml_parse(yamlstr):
[ 261s] """Parse a yaml string"""
[ 261s] yaml.SafeLoader.add_multi_constructor(
[ 261s] "!", intrinsics_multi_constructor)
[ 261s] > return yaml.safe_load(yamlstr)
[ 261s]
[ 261s] samtranslator/yaml_helper.py:13:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def safe_load(stream):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s]
[ 261s] Resolve only basic YAML tags. This is known
[ 261s] to be safe for untrusted input.
[ 261s] """
[ 261s] > return load(stream, SafeLoader)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:162:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s] Loader =
[ 261s]
[ 261s] def load(stream, Loader=None):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s] """
[ 261s] if Loader is None:
[ 261s] load_warning('load')
[ 261s] Loader = FullLoader
[ 261s]
[ 261s] > loader = Loader(stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:112:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] > Reader.__init__(self, stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/loader.py:34:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] self.name = None
[ 261s] self.stream = None
[ 261s] self.stream_pointer = 0
[ 261s] self.eof = True
[ 261s] self.buffer = ''
[ 261s] self.pointer = 0
[ 261s] self.raw_buffer = None
[ 261s] self.raw_decode = None
[ 261s] self.encoding = None
[ 261s] self.index = 0
[ 261s] self.line = 0
[ 261s] self.column = 0
[ 261s] if isinstance(stream, str):
[ 261s] self.name = "<unicode string>"
[ 261s] self.check_printable(stream)
[ 261s] self.buffer = stream+'\0'
[ 261s] elif isinstance(stream, bytes):
[ 261s] self.name = "<byte string>"
[ 261s] self.raw_buffer = stream
[ 261s] self.determine_encoding()
[ 261s] else:
[ 261s] self.stream = stream
[ 261s] self.name = getattr(stream, 'name', "<file>")
[ 261s] self.eof = False
[ 261s] self.raw_buffer = None
[ 261s] > self.determine_encoding()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:85:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def determine_encoding(self):
[ 261s] while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
[ 261s] > self.update_raw()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:124:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self = , size = 4096
[ 261s]
[ 261s] def update_raw(self, size=4096):
[ 261s] > data = self.stream.read(size)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:178:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] input = b"AWSTemplateFormatVersion: '2010-09-09'\nTransform: 'AWS::Serverless-2016-10-31'\nDescription: A template to test for... Properties:\n RestApiId: !Ref explicitapi\n Path: /explicit/hello2\n Method: get\n"
[ 261s] final = False
[ 261s]
[ 261s] def decode(self, input, final=False):
[ 261s] > return codecs.ascii_decode(input, self.errors)[0]
[ 261s] E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 753: ordinal not in range(128)
[ 261s]
[ 261s] /usr/lib64/python3.4/encodings/ascii.py:26: UnicodeDecodeError
[ 261s]
[ 261s] During handling of the above exception, another exception occurred:
[ 261s]
[ 261s] a = (,)
[ 261s]
[ 261s] @wraps(func)
[ 261s] def standalone_func(*a):
[ 261s] > return func(*(a + p.args), **p.kwargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:518:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305: in patched
[ 261s] return func(*args, **keywargs)
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:71: in dummy_func
[ 261s] return orgfunc(*args, **kwargs)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] args = (, 'implicit_and_explicit_api_with_conditions', ('aws', 'ap-southeast-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] return func(*args, **keywargs)
[ 261s] except:
[ 261s] > if (patching not in entered_patchers and
[ 261s] _is_started(patching)):
[ 261s] E UnboundLocalError: local variable 'patching' referenced before assignment
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1307: UnboundLocalError
[ 261s] TestTranslatorEndToEnd.test_transform_success_289_implicit_and_explicit_api_with_conditions
[ 261s]
[ 261s] args = (, 'implicit_and_explicit_api_with_conditions', ('aws-cn', 'cn-north-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] > return func(*args, **keywargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] testcase = 'implicit_and_explicit_api_with_conditions'
[ 261s] partition_with_region = ('aws-cn', 'cn-north-1')
[ 261s]
[ 261s] @parameterized.expand(
[ 261s] itertools.product([
[ 261s] 's3_with_condition',
[ 261s] 'function_with_condition',
[ 261s] 'basic_function',
[ 261s] 'basic_application',
[ 261s] 'application_preparing_state',
[ 261s] 'application_with_intrinsics',
[ 261s] 'basic_layer',
[ 261s] 'cloudwatchevent',
[ 261s] 'cloudwatch_logs_with_ref',
[ 261s] 'cloudwatchlog',
[ 261s] 'streams',
[ 261s] 'sqs',
[ 261s] 'simpletable',
[ 261s] 'simpletable_with_sse',
[ 261s] 'implicit_api',
[ 261s] 'explicit_api',
[ 261s] 'api_endpoint_configuration',
[ 261s] 'api_with_auth_all_maximum',
[ 261s] 'api_with_auth_all_minimum',
[ 261s] 'api_with_auth_no_default',
[ 261s] 'api_with_default_aws_iam_auth',
[ 261s] 'api_with_method_aws_iam_auth',
[ 261s] 'api_with_aws_iam_auth_overrides',
[ 261s] 'api_with_method_settings',
[ 261s] 'api_with_binary_media_types',
[ 261s] 'api_with_minimum_compression_size',
[ 261s] 'api_with_resource_refs',
[ 261s] 'api_with_cors',
[ 261s] 'api_with_cors_and_only_methods',
[ 261s] 'api_with_cors_and_only_headers',
[ 261s] 'api_with_cors_and_only_origins',
[ 261s] 'api_with_cors_and_only_maxage',
[ 261s] 'api_with_cors_and_only_credentials_false',
[ 261s] 'api_with_cors_no_definitionbody',
[ 261s] 'api_with_gateway_responses',
[ 261s] 'api_with_gateway_responses_all',
[ 261s] 'api_with_gateway_responses_minimal',
[ 261s] 'api_with_gateway_responses_implicit',
[ 261s] 'api_with_gateway_responses_string_status_code',
[ 261s] 'api_cache',
[ 261s] 'api_with_access_log_setting',
[ 261s] 'api_with_canary_setting',
[ 261s] 'api_with_xray_tracing',
[ 261s] 's3',
[ 261s] 's3_create_remove',
[ 261s] 's3_existing_lambda_notification_configuration',
[ 261s] 's3_existing_other_notification_configuration',
[ 261s] 's3_filter',
[ 261s] 's3_multiple_events_same_bucket',
[ 261s] 's3_multiple_functions',
[ 261s] 's3_with_dependsOn',
[ 261s] 'sns',
[ 261s] 'sns_existing_other_subscription',
[ 261s] 'sns_topic_outside_template',
[ 261s] 'alexa_skill',
[ 261s] 'alexa_skill_with_skill_id',
[ 261s] 'iot_rule',
[ 261s] 'layers_with_intrinsics',
[ 261s] 'layers_all_properties',
[ 261s] 'function_managed_inline_policy',
[ 261s] 'unsupported_resources',
[ 261s] 'intrinsic_functions',
[ 261s] 'basic_function_with_tags',
[ 261s] 'depends_on',
[ 261s] 'function_event_conditions',
[ 261s] 'function_with_dlq',
[ 261s] 'function_with_kmskeyarn',
[ 261s] 'function_with_alias',
[ 261s] 'function_with_alias_intrinsics',
[ 261s] 'function_with_disabled_deployment_preference',
[ 261s] 'function_with_deployment_preference',
[ 261s] 'function_with_deployment_preference_all_parameters',
[ 261s] 'function_with_deployment_preference_multiple_combinations',
[ 261s] 'function_with_alias_and_event_sources',
[ 261s] 'function_with_resource_refs',
[ 261s] 'function_with_deployment_and_custom_role',
[ 261s] 'function_with_deployment_no_service_role',
[ 261s] 'function_with_global_layers',
[ 261s] 'function_with_layers',
[ 261s] 'function_with_many_layers',
[ 261s] 'function_with_permissions_boundary',
[ 261s] 'function_with_policy_templates',
[ 261s] 'function_with_sns_event_source_all_parameters',
[ 261s] 'globals_for_function',
[ 261s] 'globals_for_api',
[ 261s] 'globals_for_simpletable',
[ 261s] 'all_policy_templates',
[ 261s] 'simple_table_ref_parameter_intrinsic',
[ 261s] 'simple_table_with_table_name',
[ 261s] 'function_concurrency',
[ 261s] 'simple_table_with_extra_tags',
[ 261s] 'explicit_api_with_invalid_events_config',
[ 261s] 'no_implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_auth_and_conditions_max',
[ 261s] 'implicit_api_with_many_conditions',
[ 261s] 'implicit_and_explicit_api_with_conditions',
[ 261s] 'api_with_cors_and_conditions_no_definitionbody',
[ 261s] 'api_with_auth_and_conditions_all_max'
[ 261s] ],
[ 261s] [
[ 261s] ("aws", "ap-southeast-1"),
[ 261s] ("aws-cn", "cn-north-1"),
[ 261s] ("aws-us-gov", "us-gov-west-1")
[ 261s] ] # Run all the above tests against each of the list of partitions to test against
[ 261s] )
[ 261s] )
[ 261s] @patch('samtranslator.plugins.application.serverless_app_plugin.ServerlessAppPlugin._sar_service_call', mock_sar_service_call)
[ 261s] @patch('botocore.client.ClientEndpointBridge._check_default_region', mock_get_region)
[ 261s] def test_transform_success(self, testcase, partition_with_region):
[ 261s] partition = partition_with_region[0]
[ 261s] region = partition_with_region[1]
[ 261s]
[ 261s] > manifest = yaml_parse(open(os.path.join(INPUT_FOLDER, testcase + '.yaml'), 'r'))
[ 261s]
[ 261s] tests/translator/test_translator.py:253:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] yamlstr = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def yaml_parse(yamlstr):
[ 261s] """Parse a yaml string"""
[ 261s] yaml.SafeLoader.add_multi_constructor(
[ 261s] "!", intrinsics_multi_constructor)
[ 261s] > return yaml.safe_load(yamlstr)
[ 261s]
[ 261s] samtranslator/yaml_helper.py:13:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def safe_load(stream):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s]
[ 261s] Resolve only basic YAML tags. This is known
[ 261s] to be safe for untrusted input.
[ 261s] """
[ 261s] > return load(stream, SafeLoader)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:162:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s] Loader =
[ 261s]
[ 261s] def load(stream, Loader=None):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s] """
[ 261s] if Loader is None:
[ 261s] load_warning('load')
[ 261s] Loader = FullLoader
[ 261s]
[ 261s] > loader = Loader(stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:112:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] > Reader.__init__(self, stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/loader.py:34:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] self.name = None
[ 261s] self.stream = None
[ 261s] self.stream_pointer = 0
[ 261s] self.eof = True
[ 261s] self.buffer = ''
[ 261s] self.pointer = 0
[ 261s] self.raw_buffer = None
[ 261s] self.raw_decode = None
[ 261s] self.encoding = None
[ 261s] self.index = 0
[ 261s] self.line = 0
[ 261s] self.column = 0
[ 261s] if isinstance(stream, str):
[ 261s] self.name = "<unicode string>"
[ 261s] self.check_printable(stream)
[ 261s] self.buffer = stream+'\0'
[ 261s] elif isinstance(stream, bytes):
[ 261s] self.name = "<byte string>"
[ 261s] self.raw_buffer = stream
[ 261s] self.determine_encoding()
[ 261s] else:
[ 261s] self.stream = stream
[ 261s] self.name = getattr(stream, 'name', "<file>")
[ 261s] self.eof = False
[ 261s] self.raw_buffer = None
[ 261s] > self.determine_encoding()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:85:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def determine_encoding(self):
[ 261s] while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
[ 261s] > self.update_raw()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:124:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self = , size = 4096
[ 261s]
[ 261s] def update_raw(self, size=4096):
[ 261s] > data = self.stream.read(size)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:178:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] input = b"AWSTemplateFormatVersion: '2010-09-09'\nTransform: 'AWS::Serverless-2016-10-31'\nDescription: A template to test for... Properties:\n RestApiId: !Ref explicitapi\n Path: /explicit/hello2\n Method: get\n"
[ 261s] final = False
[ 261s]
[ 261s] def decode(self, input, final=False):
[ 261s] > return codecs.ascii_decode(input, self.errors)[0]
[ 261s] E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 753: ordinal not in range(128)
[ 261s]
[ 261s] /usr/lib64/python3.4/encodings/ascii.py:26: UnicodeDecodeError
[ 261s]
[ 261s] During handling of the above exception, another exception occurred:
[ 261s]
[ 261s] a = (,)
[ 261s]
[ 261s] @wraps(func)
[ 261s] def standalone_func(*a):
[ 261s] > return func(*(a + p.args), **p.kwargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:518:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305: in patched
[ 261s] return func(*args, **keywargs)
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:71: in dummy_func
[ 261s] return orgfunc(*args, **kwargs)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] args = (, 'implicit_and_explicit_api_with_conditions', ('aws-cn', 'cn-north-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] return func(*args, **keywargs)
[ 261s] except:
[ 261s] > if (patching not in entered_patchers and
[ 261s] _is_started(patching)):
[ 261s] E UnboundLocalError: local variable 'patching' referenced before assignment
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1307: UnboundLocalError
[ 261s] TestTranslatorEndToEnd.test_transform_success_290_implicit_and_explicit_api_with_conditions
[ 261s]
[ 261s] args = (, 'implicit_and_explicit_api_with_conditions', ('aws-us-gov', 'us-gov-west-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] > return func(*args, **keywargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] testcase = 'implicit_and_explicit_api_with_conditions'
[ 261s] partition_with_region = ('aws-us-gov', 'us-gov-west-1')
[ 261s]
[ 261s] @parameterized.expand(
[ 261s] itertools.product([
[ 261s] 's3_with_condition',
[ 261s] 'function_with_condition',
[ 261s] 'basic_function',
[ 261s] 'basic_application',
[ 261s] 'application_preparing_state',
[ 261s] 'application_with_intrinsics',
[ 261s] 'basic_layer',
[ 261s] 'cloudwatchevent',
[ 261s] 'cloudwatch_logs_with_ref',
[ 261s] 'cloudwatchlog',
[ 261s] 'streams',
[ 261s] 'sqs',
[ 261s] 'simpletable',
[ 261s] 'simpletable_with_sse',
[ 261s] 'implicit_api',
[ 261s] 'explicit_api',
[ 261s] 'api_endpoint_configuration',
[ 261s] 'api_with_auth_all_maximum',
[ 261s] 'api_with_auth_all_minimum',
[ 261s] 'api_with_auth_no_default',
[ 261s] 'api_with_default_aws_iam_auth',
[ 261s] 'api_with_method_aws_iam_auth',
[ 261s] 'api_with_aws_iam_auth_overrides',
[ 261s] 'api_with_method_settings',
[ 261s] 'api_with_binary_media_types',
[ 261s] 'api_with_minimum_compression_size',
[ 261s] 'api_with_resource_refs',
[ 261s] 'api_with_cors',
[ 261s] 'api_with_cors_and_only_methods',
[ 261s] 'api_with_cors_and_only_headers',
[ 261s] 'api_with_cors_and_only_origins',
[ 261s] 'api_with_cors_and_only_maxage',
[ 261s] 'api_with_cors_and_only_credentials_false',
[ 261s] 'api_with_cors_no_definitionbody',
[ 261s] 'api_with_gateway_responses',
[ 261s] 'api_with_gateway_responses_all',
[ 261s] 'api_with_gateway_responses_minimal',
[ 261s] 'api_with_gateway_responses_implicit',
[ 261s] 'api_with_gateway_responses_string_status_code',
[ 261s] 'api_cache',
[ 261s] 'api_with_access_log_setting',
[ 261s] 'api_with_canary_setting',
[ 261s] 'api_with_xray_tracing',
[ 261s] 's3',
[ 261s] 's3_create_remove',
[ 261s] 's3_existing_lambda_notification_configuration',
[ 261s] 's3_existing_other_notification_configuration',
[ 261s] 's3_filter',
[ 261s] 's3_multiple_events_same_bucket',
[ 261s] 's3_multiple_functions',
[ 261s] 's3_with_dependsOn',
[ 261s] 'sns',
[ 261s] 'sns_existing_other_subscription',
[ 261s] 'sns_topic_outside_template',
[ 261s] 'alexa_skill',
[ 261s] 'alexa_skill_with_skill_id',
[ 261s] 'iot_rule',
[ 261s] 'layers_with_intrinsics',
[ 261s] 'layers_all_properties',
[ 261s] 'function_managed_inline_policy',
[ 261s] 'unsupported_resources',
[ 261s] 'intrinsic_functions',
[ 261s] 'basic_function_with_tags',
[ 261s] 'depends_on',
[ 261s] 'function_event_conditions',
[ 261s] 'function_with_dlq',
[ 261s] 'function_with_kmskeyarn',
[ 261s] 'function_with_alias',
[ 261s] 'function_with_alias_intrinsics',
[ 261s] 'function_with_disabled_deployment_preference',
[ 261s] 'function_with_deployment_preference',
[ 261s] 'function_with_deployment_preference_all_parameters',
[ 261s] 'function_with_deployment_preference_multiple_combinations',
[ 261s] 'function_with_alias_and_event_sources',
[ 261s] 'function_with_resource_refs',
[ 261s] 'function_with_deployment_and_custom_role',
[ 261s] 'function_with_deployment_no_service_role',
[ 261s] 'function_with_global_layers',
[ 261s] 'function_with_layers',
[ 261s] 'function_with_many_layers',
[ 261s] 'function_with_permissions_boundary',
[ 261s] 'function_with_policy_templates',
[ 261s] 'function_with_sns_event_source_all_parameters',
[ 261s] 'globals_for_function',
[ 261s] 'globals_for_api',
[ 261s] 'globals_for_simpletable',
[ 261s] 'all_policy_templates',
[ 261s] 'simple_table_ref_parameter_intrinsic',
[ 261s] 'simple_table_with_table_name',
[ 261s] 'function_concurrency',
[ 261s] 'simple_table_with_extra_tags',
[ 261s] 'explicit_api_with_invalid_events_config',
[ 261s] 'no_implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_serverless_rest_api_resource',
[ 261s] 'implicit_api_with_auth_and_conditions_max',
[ 261s] 'implicit_api_with_many_conditions',
[ 261s] 'implicit_and_explicit_api_with_conditions',
[ 261s] 'api_with_cors_and_conditions_no_definitionbody',
[ 261s] 'api_with_auth_and_conditions_all_max'
[ 261s] ],
[ 261s] [
[ 261s] ("aws", "ap-southeast-1"),
[ 261s] ("aws-cn", "cn-north-1"),
[ 261s] ("aws-us-gov", "us-gov-west-1")
[ 261s] ] # Run all the above tests against each of the list of partitions to test against
[ 261s] )
[ 261s] )
[ 261s] @patch('samtranslator.plugins.application.serverless_app_plugin.ServerlessAppPlugin._sar_service_call', mock_sar_service_call)
[ 261s] @patch('botocore.client.ClientEndpointBridge._check_default_region', mock_get_region)
[ 261s] def test_transform_success(self, testcase, partition_with_region):
[ 261s] partition = partition_with_region[0]
[ 261s] region = partition_with_region[1]
[ 261s]
[ 261s] > manifest = yaml_parse(open(os.path.join(INPUT_FOLDER, testcase + '.yaml'), 'r'))
[ 261s]
[ 261s] tests/translator/test_translator.py:253:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] yamlstr = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def yaml_parse(yamlstr):
[ 261s] """Parse a yaml string"""
[ 261s] yaml.SafeLoader.add_multi_constructor(
[ 261s] "!", intrinsics_multi_constructor)
[ 261s] > return yaml.safe_load(yamlstr)
[ 261s]
[ 261s] samtranslator/yaml_helper.py:13:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def safe_load(stream):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s]
[ 261s] Resolve only basic YAML tags. This is known
[ 261s] to be safe for untrusted input.
[ 261s] """
[ 261s] > return load(stream, SafeLoader)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:162:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s] Loader =
[ 261s]
[ 261s] def load(stream, Loader=None):
[ 261s] """
[ 261s] Parse the first YAML document in a stream
[ 261s] and produce the corresponding Python object.
[ 261s] """
[ 261s] if Loader is None:
[ 261s] load_warning('load')
[ 261s] Loader = FullLoader
[ 261s]
[ 261s] > loader = Loader(stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/__init__.py:112:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] > Reader.__init__(self, stream)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/loader.py:34:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] stream = <_io.TextIOWrapper name='/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/input/implicit_and_explicit_api_with_conditions.yaml' mode='r' encoding='ANSI_X3.4-1968'>
[ 261s]
[ 261s] def __init__(self, stream):
[ 261s] self.name = None
[ 261s] self.stream = None
[ 261s] self.stream_pointer = 0
[ 261s] self.eof = True
[ 261s] self.buffer = ''
[ 261s] self.pointer = 0
[ 261s] self.raw_buffer = None
[ 261s] self.raw_decode = None
[ 261s] self.encoding = None
[ 261s] self.index = 0
[ 261s] self.line = 0
[ 261s] self.column = 0
[ 261s] if isinstance(stream, str):
[ 261s] self.name = "<unicode string>"
[ 261s] self.check_printable(stream)
[ 261s] self.buffer = stream+'\0'
[ 261s] elif isinstance(stream, bytes):
[ 261s] self.name = "<byte string>"
[ 261s] self.raw_buffer = stream
[ 261s] self.determine_encoding()
[ 261s] else:
[ 261s] self.stream = stream
[ 261s] self.name = getattr(stream, 'name', "<file>")
[ 261s] self.eof = False
[ 261s] self.raw_buffer = None
[ 261s] > self.determine_encoding()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:85:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s]
[ 261s] def determine_encoding(self):
[ 261s] while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
[ 261s] > self.update_raw()
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:124:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self = , size = 4096
[ 261s]
[ 261s] def update_raw(self, size=4096):
[ 261s] > data = self.stream.read(size)
[ 261s]
[ 261s] /usr/lib64/python3.4/site-packages/yaml/reader.py:178:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] self =
[ 261s] input = b"AWSTemplateFormatVersion: '2010-09-09'\nTransform: 'AWS::Serverless-2016-10-31'\nDescription: A template to test for... Properties:\n RestApiId: !Ref explicitapi\n Path: /explicit/hello2\n Method: get\n"
[ 261s] final = False
[ 261s]
[ 261s] def decode(self, input, final=False):
[ 261s] > return codecs.ascii_decode(input, self.errors)[0]
[ 261s] E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 753: ordinal not in range(128)
[ 261s]
[ 261s] /usr/lib64/python3.4/encodings/ascii.py:26: UnicodeDecodeError
[ 261s]
[ 261s] During handling of the above exception, another exception occurred:
[ 261s]
[ 261s] a = (,)
[ 261s]
[ 261s] @wraps(func)
[ 261s] def standalone_func(*a):
[ 261s] > return func(*(a + p.args), **p.kwargs)
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:518:
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1305: in patched
[ 261s] return func(*args, **keywargs)
[ 261s] /usr/lib/python3.4/site-packages/parameterized/parameterized.py:71: in dummy_func
[ 261s] return orgfunc(*args, **kwargs)
[ 261s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 261s]
[ 261s] args = (, 'implicit_and_explicit_api_with_conditions', ('aws-us-gov', 'us-gov-west-1'))
[ 261s] keywargs = {}, extra_args = [], entered_patchers = [], exc_info = ()
[ 261s]
[ 261s] @wraps(func)
[ 261s] def patched(*args, **keywargs):
[ 261s] extra_args = []
[ 261s] entered_patchers = []
[ 261s]
[ 261s] exc_info = tuple()
[ 261s] try:
[ 261s] for patching in patched.patchings:
[ 261s] arg = patching.__enter__()
[ 261s] entered_patchers.append(patching)
[ 261s] if patching.attribute_name is not None:
[ 261s] keywargs.update(arg)
[ 261s] elif patching.new is DEFAULT:
[ 261s] extra_args.append(arg)
[ 261s]
[ 261s] args += tuple(extra_args)
[ 261s] return func(*args, **keywargs)
[ 261s] except:
[ 261s] > if (patching not in entered_patchers and
[ 261s] _is_started(patching)):
[ 261s] E UnboundLocalError: local variable 'patching' referenced before assignment
[ 261s]
[ 261s] /usr/lib/python3.4/site-packages/mock/mock.py:1307: UnboundLocalError
[ 261s] ____ test_transform_invalid_document[error_api_duplicate_methods_same_path] ____
[ 261s]
[ 261s] testcase = 'error_api_duplicate_methods_same_path'
[ 261s]
[ 261s] @pytest.mark.parametrize('testcase', [
[ 261s] 'error_api_duplicate_methods_same_path',
[ 261s] 'error_api_gateway_responses_nonnumeric_status_code',
[ 261s] 'error_api_gateway_responses_unknown_responseparameter',
[ 261s] 'error_api_gateway_responses_unknown_responseparameter_property',
[ 261s] 'error_api_invalid_auth',
[ 261s] 'error_api_invalid_path',
[ 261s] 'error_api_invalid_definitionuri',
[ 261s] 'error_api_invalid_definitionbody',
[ 261s] 'error_api_invalid_stagename',
[ 261s] 'error_api_invalid_restapiid',
[ 261s] 'error_application_properties',
[ 261s] 'error_application_does_not_exist',
[ 261s] 'error_application_no_access',
[ 261s] 'error_application_preparing_timeout',
[ 261s] 'error_cors_on_external_swagger',
[ 261s] 'error_invalid_cors_dict',
[ 261s] 'error_invalid_findinmap',
[ 261s] 'error_invalid_getatt',
[ 261s] 'error_cors_credentials_true_with_wildcard_origin',
[ 261s] 'error_cors_credentials_true_without_explicit_origin',
[ 261s] 'error_function_invalid_codeuri',
[ 261s] 'error_function_invalid_api_event',
[ 261s] 'error_function_invalid_autopublishalias',
[ 261s] 'error_function_invalid_event_type',
[ 261s] 'error_function_invalid_layer',
[ 261s] 'error_function_no_codeuri',
[ 261s] 'error_function_no_handler',
[ 261s] 'error_function_no_runtime',
[ 261s] 'error_function_with_deployment_preference_missing_alias',
[ 261s] 'error_function_with_invalid_deployment_preference_hook_property',
[ 261s] 'error_invalid_logical_id',
[ 261s] 'error_layer_invalid_properties',
[ 261s] 'error_missing_queue',
[ 261s] 'error_missing_startingposition',
[ 261s] 'error_missing_stream',
[ 261s] 'error_multiple_resource_errors',
[ 261s] 'error_s3_not_in_template',
[ 261s] 'error_table_invalid_attributetype',
[ 261s] 'error_invalid_resource_parameters',
[ 261s] 'error_reserved_sam_tag',
[ 261s] 'existing_event_logical_id',
[ 261s] 'existing_permission_logical_id',
[ 261s] 'existing_role_logical_id',
[ 261s] 'error_invalid_template',
[ 261s] 'error_resource_not_dict',
[ 261s] 'error_resource_properties_not_dict',
[ 261s] 'error_globals_is_not_dict',
[ 261s] 'error_globals_unsupported_type',
[ 261s] 'error_globals_unsupported_property',
[ 261s] 'error_globals_api_with_stage_name',
[ 261s] 'error_function_policy_template_with_missing_parameter',
[ 261s] 'error_function_policy_template_invalid_value',
[ 261s] 'error_function_with_unknown_policy_template',
[ 261s] 'error_function_with_invalid_policy_statement'
[ 261s] ])
[ 261s] @patch('boto3.session.Session.region_name', 'ap-southeast-1')
[ 261s] @patch('samtranslator.plugins.application.serverless_app_plugin.ServerlessAppPlugin._sar_service_call', mock_sar_service_call)
[ 261s] @patch('botocore.client.ClientEndpointBridge._check_default_region', mock_get_region)
[ 261s] def test_transform_invalid_document(testcase):
[ 261s] manifest = yaml_parse(open(os.path.join(INPUT_FOLDER, testcase + '.yaml'), 'r'))
[ 261s] expected = json.load(open(os.path.join(OUTPUT_FOLDER, testcase + '.json'), 'r'))
[ 261s]
[ 261s] mock_policy_loader = MagicMock()
[ 261s] parameter_values = get_template_parameter_values()
[ 261s]
[ 261s] with pytest.raises(InvalidDocumentException) as e:
[ 261s] transform(manifest, parameter_values, mock_policy_loader)
[ 261s]
[ 261s] error_message = get_exception_error_message(e)
[ 261s]
[ 261s] > assert error_message == expected.get('errorMessage')
[ 261s] E assert 'Invalid Serv... path "/add".' == 'Invalid Serve... path "/add".'
[ 261s] E - Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function1] is invalid. Event with id [AddItem] is invalid. API method "post" defined multiple times for path "/add".
[ 261s] E ? ^ ^^^^^^^
[ 261s] E + Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function2] is invalid. Event with id [GetHtml] is invalid. API method "post" defined multiple times for path...
[ 261s] E
[ 261s] E ...Full output truncated (2 lines hidden), use '-vv' to show
[ 261s]
[ 261s] tests/translator/test_translator.py:421: AssertionError
[ 261s] ------------------------------ Captured log call -------------------------------
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
[ 261s] hooks.py 417 DEBUG Changing event name from before-call.apigateway to before-call.api-gateway
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
[ 261s] hooks.py 417 DEBUG Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
[ 261s] hooks.py 417 DEBUG Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
[ 261s] hooks.py 417 DEBUG Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
[ 261s] =================== 10 failed, 955 passed in 129.41 seconds ====================
N�����r��y隊Z)z{.��r�'��칻�&ޢ��������'��-���w�zf���^�ˬz������ ޮ�^�ˬz��