Keep order in request body to ensure auth signing works. (#3024)

* Keep order in request body to ensure auth signing works.

* Lint.

* More OrderedDict to ensure data parameter order.

* Lint.

* Improve CF test assertions.

* Fix syntax error.

* Cleanup CF test.
This commit is contained in:
Steve Pulec 2020-05-24 02:51:45 -05:00 committed by GitHub
commit 59c71760ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 13 deletions

View file

@ -62,10 +62,9 @@ def test_boto3_json_invalid_missing_resource():
cf_conn.validate_template(TemplateBody=dummy_bad_template_json)
assert False
except botocore.exceptions.ClientError as e:
assert (
str(e)
== "An error occurred (ValidationError) when calling the ValidateTemplate operation: Stack"
" with id Missing top level item Resources to file module does not exist"
str(e).should.contain(
"An error occurred (ValidationError) when calling the ValidateTemplate operation: Stack"
" with id Missing top level"
)
assert True
@ -103,9 +102,8 @@ def test_boto3_yaml_invalid_missing_resource():
cf_conn.validate_template(TemplateBody=yaml_bad_template)
assert False
except botocore.exceptions.ClientError as e:
assert (
str(e)
== "An error occurred (ValidationError) when calling the ValidateTemplate operation: Stack"
" with id Missing top level item Resources to file module does not exist"
str(e).should.contain(
"An error occurred (ValidationError) when calling the ValidateTemplate operation: Stack"
" with id Missing top level"
)
assert True