mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-03 07:41:30 -07: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 __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
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.aws.core import HAS_BOTO3
|
||||||
from ansible.module_utils import basic
|
from ansible.module_utils import basic
|
||||||
from ansible.module_utils.basic import to_bytes
|
from ansible.module_utils.basic import to_bytes
|
||||||
|
@ -29,15 +27,14 @@ from ansible.compat.tests.mock import MagicMock
|
||||||
import json
|
import json
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
from botocore.exceptions import ClientError
|
|
||||||
# try:
|
|
||||||
# from botocore import ResourceNotFoundException
|
|
||||||
# except:
|
|
||||||
# pass # will be protected by HAS_BOTO3
|
|
||||||
|
|
||||||
if not HAS_BOTO3:
|
if not HAS_BOTO3:
|
||||||
raise SkipTest("test_api_gateway.py requires the `boto3` and `botocore` modules")
|
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 = {
|
base_module_args = {
|
||||||
"region": "us-west-1",
|
"region": "us-west-1",
|
||||||
"function_name": "this_is_a_test_function",
|
"function_name": "this_is_a_test_function",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue