Skip to content

Commit

Permalink
Split cloudformation unit test fix off from module_util migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed May 13, 2020
1 parent 0c476eb commit a02f6b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/unit/modules/test_cloudformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pytest

from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto_exception
from ansible_collections.amazon.aws.plugins.modules import cloudformation as cfn_module

basic_yaml_tpl = """
Expand Down Expand Up @@ -64,6 +65,11 @@ def fail_json(self, *args, **kwargs):
self.exit_kwargs = kwargs
raise Exception('FAIL')

def fail_json_aws(self, *args, **kwargs):
self.exit_args = args
self.exit_kwargs = kwargs
raise Exception('FAIL')

def exit_json(self, *args, **kwargs):
self.exit_args = args
self.exit_kwargs = kwargs
Expand All @@ -82,7 +88,7 @@ def test_invalid_template_json(placeboify):
pytest.fail('Expected malformed JSON to have caused the call to fail')

assert exc_info.match('FAIL')
assert "ValidationError" in m.exit_kwargs['msg']
assert "ValidationError" in boto_exception(m.exit_args[0])


def test_client_request_token_s3_stack(maybe_sleep, placeboify):
Expand Down

0 comments on commit a02f6b2

Please sign in to comment.