[opensuse-python] python-aws-sam-translator testsuite failure on SLE-12 (cannot import ssl)
Hi! We need python-aws-sam-translator and python-cfn-lint for SLE-12 and I'm currently preparing the necessary set of packages for a submission to SLE-12. Unfortunately, I can't get the testsuite of python-aws-sam-translator to pass on SLE-12, it fails with the backtrace below. Does anyone have a clue what the problem could be? I'm currently out of ideas. The current (slightly modified) version of the package can be found at [1]. Thanks, Adrian
[1] https://build.opensuse.org/package/show/home:glaubitz:branches:devel:languag...
[ 9s] FAIL Required test coverage of 95% not reached. Total coverage: 13.42% [ 9s] ==================================== ERRORS ==================================== [ 9s] ______________ ERROR collecting tests/model/test_sam_resources.py ______________ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/model/test_sam_resources.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/model/test_sam_resources.py:8: in <module> [ 9s] from samtranslator.model.sam_resources import SamFunction [ 9s] samtranslator/model/sam_resources.py:5: in <module> [ 9s] import samtranslator.model.eventsources.pull [ 9s] samtranslator/model/eventsources/pull.py:5: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] ______ ERROR collecting tests/model/eventsources/test_api_event_source.py ______ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/model/eventsources/test_api_event_source.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/model/eventsources/test_api_event_source.py:4: in <module> [ 9s] from samtranslator.model.eventsources.push import Api [ 9s] samtranslator/model/eventsources/push.py:14: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] ERROR collecting tests/model/eventsources/test_cloudwatchlogs_event_source.py _ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/model/eventsources/test_cloudwatchlogs_event_source.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/model/eventsources/test_cloudwatchlogs_event_source.py:3: in <module> [ 9s] from samtranslator.model.eventsources.cloudwatchlogs import CloudWatchLogs [ 9s] samtranslator/model/eventsources/cloudwatchlogs.py:5: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] ______ ERROR collecting tests/model/eventsources/test_sns_event_source.py ______ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/model/eventsources/test_sns_event_source.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/model/eventsources/test_sns_event_source.py:3: in <module> [ 9s] from samtranslator.model.eventsources.push import SNS [ 9s] samtranslator/model/eventsources/push.py:14: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] ___ ERROR collecting tests/plugins/application/test_serverless_app_plugin.py ___ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/plugins/application/test_serverless_app_plugin.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/plugins/application/test_serverless_app_plugin.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] _________________ ERROR collecting tests/sdk/test_parameter.py _________________ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/sdk/test_parameter.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/sdk/test_parameter.py:5: in <module> [ 9s] from samtranslator.sdk.parameter import SamParameterValues [ 9s] samtranslator/sdk/parameter.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] ____________ ERROR collecting tests/translator/test_api_resource.py ____________ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/test_api_resource.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/translator/test_api_resource.py:7: in <module> [ 9s] from samtranslator.translator.transform import transform [ 9s] samtranslator/translator/transform.py:1: in <module> [ 9s] from samtranslator.translator.translator import Translator [ 9s] samtranslator/translator/translator.py:3: in <module> [ 9s] from samtranslator.model import ResourceTypeResolver, sam_resources [ 9s] samtranslator/model/sam_resources.py:5: in <module> [ 9s] import samtranslator.model.eventsources.pull [ 9s] samtranslator/model/eventsources/pull.py:5: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] _________ ERROR collecting tests/translator/test_function_resources.py _________ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/test_function_resources.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/translator/test_function_resources.py:4: in <module> [ 9s] from samtranslator.model.sam_resources import SamFunction [ 9s] samtranslator/model/sam_resources.py:5: in <module> [ 9s] import samtranslator.model.eventsources.pull [ 9s] samtranslator/model/eventsources/pull.py:5: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] _____________ ERROR collecting tests/translator/test_translator.py _____________ [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/test_translator.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/translator/test_translator.py:8: in <module> [ 9s] from samtranslator.translator.translator import Translator, prepare_plugins, make_policy_template_for_function_plugin [ 9s] samtranslator/translator/translator.py:3: in <module> [ 9s] from samtranslator.model import ResourceTypeResolver, sam_resources [ 9s] samtranslator/model/sam_resources.py:5: in <module> [ 9s] import samtranslator.model.eventsources.pull [ 9s] samtranslator/model/eventsources/pull.py:5: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] ERROR collecting tests/translator/model/preferences/test_deployment_preference_collection.py [ 9s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/serverless-application-model-1.11.0/tests/translator/model/preferences/test_deployment_preference_collection.py'. [ 9s] Hint: make sure your test modules/packages have valid Python names. [ 9s] Traceback: [ 9s] tests/translator/model/preferences/test_deployment_preference_collection.py:9: in <module> [ 9s] from samtranslator.model.preferences.deployment_preference_collection import CODEDEPLOY_APPLICATION_LOGICAL_ID [ 9s] samtranslator/model/preferences/deployment_preference_collection.py:7: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl [ 9s] !!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!! [ 9s] =========================== 10 error in 2.84 seconds =========================== [ 9s] error: Bad exit status from /var/tmp/rpm-tmp.XLo89s (%check) [ 9s] [ 9s] [ 9s] RPM build errors: [ 9s] Bad exit status from /var/tmp/rpm-tmp.XLo89s (%check) [ 9s] [ 9s] suse-laptop failed "build python-aws-sam-translator.spec" at Wed Jul 10 13:30:21 UTC 2019. [ 9s] The buildroot was: /var/tmp/build-root/SUSE_SLE-12-SP1_Update-x86_64 N�����r��y隊Z)z{.��r�'��칻�&ޢ��������'��-���w�zf���^�ˬz������ ޮ�^�ˬz��
John Paul Adrian Glaubitz píše v St 10. 07. 2019 v 13:34 +0000:
[ 9s] Traceback:
[ 9s] tests/model/test_sam_resources.py:8: in <module> [ 9s] from samtranslator.model.sam_resources import SamFunction [ 9s] samtranslator/model/sam_resources.py:5: in <module> [ 9s] import samtranslator.model.eventsources.pull [ 9s] samtranslator/model/eventsources/pull.py:5: in <module> [ 9s] from samtranslator.translator.arn_generator import ArnGenerator [ 9s] samtranslator/translator/arn_generator.py:1: in <module> [ 9s] import boto3 [ 9s] /usr/lib/python2.7/site-packages/boto3/__init__.py:16: in <module> [ 9s] from boto3.session import Session [ 9s] /usr/lib/python2.7/site-packages/boto3/session.py:17: in <module> [ 9s] import botocore.session [ 9s] /usr/lib/python2.7/site-packages/botocore/session.py:30: in <module> [ 9s] import botocore.credentials [ 9s] /usr/lib/python2.7/site-packages/botocore/credentials.py:42: in <module> [ 9s] from botocore.utils import InstanceMetadataFetcher, parse_key_val_file [ 9s] /usr/lib/python2.7/site-packages/botocore/utils.py:31: in <module> [ 9s] import botocore.httpsession [ 9s] /usr/lib/python2.7/site-packages/botocore/httpsession.py:7: in <module> [ 9s] from urllib3.util.ssl_ import ( [ 9s] E ImportError: cannot import name ssl
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. This is fixed on future releases but SLE12 can't handle this sadly. Cheers Tom
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 = <tests.plugins.api.test_implicit_api_plugin.TestImplicitApiPlugin_process_api_events testMethod=test_must_retain_side_effect_of_modifying_events> [ 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 = <tests.plugins.api.test_implicit_api_plugin.TestImplicitApiPlugin_process_api_events testMethod=test_must_work_with_api_events> [ 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 = <tests.sdk.test_template.TestSamTemplate testMethod=test_iterate_must_filter_by_resource_type> [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_285_implicit_api_with_many_conditions>, '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 = <tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_285_implicit_api_with_many_conditions> [ 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 = <class 'yaml.loader.SafeLoader'> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bdde72198> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bdde72198> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bdde72198> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bdde72198>, 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 = <encodings.ascii.IncrementalDecoder object at 0x7f4bdde72e80> [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_285_implicit_api_with_many_conditions>,) [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_285_implicit_api_with_many_conditions>, '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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_286_implicit_api_with_many_conditions>, '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 = <tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_286_implicit_api_with_many_conditions> [ 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 = <class 'yaml.loader.SafeLoader'> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddefada0> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddefada0> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddefada0> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddefada0>, 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 = <encodings.ascii.IncrementalDecoder object at 0x7f4bddefa7b8> [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_286_implicit_api_with_many_conditions>,) [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_286_implicit_api_with_many_conditions>, '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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_287_implicit_api_with_many_conditions>, '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 = <tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_287_implicit_api_with_many_conditions> [ 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 = <class 'yaml.loader.SafeLoader'> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf0bdd8> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf0bdd8> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf0bdd8> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf0bdd8>, 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 = <encodings.ascii.IncrementalDecoder object at 0x7f4bddf0b6a0> [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_287_implicit_api_with_many_conditions>,) [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_287_implicit_api_with_many_conditions>, '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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_288_implicit_and_explicit_api_with_conditions>, '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 = <tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_288_implicit_and_explicit_api_with_conditions> [ 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 = <class 'yaml.loader.SafeLoader'> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf4f860> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf4f860> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf4f860> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf4f860>, 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 = <encodings.ascii.IncrementalDecoder object at 0x7f4bddf4fb38> [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_288_implicit_and_explicit_api_with_conditions>,) [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_288_implicit_and_explicit_api_with_conditions>, '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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_289_implicit_and_explicit_api_with_conditions>, '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 = <tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_289_implicit_and_explicit_api_with_conditions> [ 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 = <class 'yaml.loader.SafeLoader'> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf84278> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf84278> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf84278> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddf84278>, 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 = <encodings.ascii.IncrementalDecoder object at 0x7f4bde4059b0> [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_289_implicit_and_explicit_api_with_conditions>,) [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_289_implicit_and_explicit_api_with_conditions>, '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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_290_implicit_and_explicit_api_with_conditions>, '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 = <tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_290_implicit_and_explicit_api_with_conditions> [ 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 = <class 'yaml.loader.SafeLoader'> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddd47208> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddd47208> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddd47208> [ 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 = <yaml.loader.SafeLoader object at 0x7f4bddd47208>, 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 = <encodings.ascii.IncrementalDecoder object at 0x7f4bddd471d0> [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_290_implicit_and_explicit_api_with_conditions>,) [ 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 = (<tests.translator.test_translator.TestTranslatorEndToEnd testMethod=test_transform_success_290_implicit_and_explicit_api_with_conditions>, '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��
John Paul Adrian Glaubitz píše v Čt 11. 07. 2019 v 08:59 +0000:
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)
export LANG=en_US.UTF8 Somewhere prior the test call should make it happier. It is because some stuff in the code is in unicode while OBS runs in LC_ALL=C Cheers Tom
On 7/11/19 11:02 AM, Tomas Chvatal wrote:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 991: ordinal not in range(128)
export LANG=en_US.UTF8
Somewhere prior the test call should make it happier. It is because some stuff in the code is in unicode while OBS runs in LC_ALL=C
Ah, yes, I had this before as well. Fixed it now and submitted to d:l:p:aws. Thanks a lot! Adrian
On 7/11/19 11:02 AM, Tomas Chvatal wrote:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 991: ordinal not in range(128)
export LANG=en_US.UTF8
Somewhere prior the test call should make it happier. It is because some stuff in the code is in unicode while OBS runs in LC_ALL=C
Ah, yes, I had this before as well. Fixed it now and submitted to d:l:p:aws. Thanks a lot! Adrian
participants (2)
-
John Paul Adrian Glaubitz
-
Tomas Chvatal