diff --git a/test/units/modules/cloud/amazon/test_lambda_policy.py b/test/units/modules/cloud/amazon/test_lambda_policy.py index 02d1bf7542..550e0405b7 100644 --- a/test/units/modules/cloud/amazon/test_lambda_policy.py +++ b/test/units/modules/cloud/amazon/test_lambda_policy.py @@ -20,8 +20,6 @@ from __future__ import (absolute_import, division, print_function) from nose.plugins.skip import SkipTest -import ansible.modules.cloud.amazon.lambda_policy as lambda_policy -from ansible.modules.cloud.amazon.lambda_policy import setup_module_object from ansible.module_utils.aws.core import HAS_BOTO3 from ansible.module_utils import basic from ansible.module_utils.basic import to_bytes @@ -29,15 +27,14 @@ from ansible.compat.tests.mock import MagicMock import json import copy -from botocore.exceptions import ClientError -# try: -# from botocore import ResourceNotFoundException -# except: -# pass # will be protected by HAS_BOTO3 - if not HAS_BOTO3: raise SkipTest("test_api_gateway.py requires the `boto3` and `botocore` modules") +# these are here cause ... boto! +from botocore.exceptions import ClientError +import ansible.modules.cloud.amazon.lambda_policy as lambda_policy +from ansible.modules.cloud.amazon.lambda_policy import setup_module_object + base_module_args = { "region": "us-west-1", "function_name": "this_is_a_test_function",