mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix improt order to actually skip when no boto
This commit is contained in:
parent
883aede8ac
commit
aec1dfd1fa
1 changed files with 5 additions and 8 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue