really skip if no boto3
makes no sense to check/skip after you already fail to import
This commit is contained in:
parent
b697da39c8
commit
581b6aed2e
1 changed files with 3 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
||||||
import boto3
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from units.modules.utils import set_module_args
|
from units.modules.utils import set_module_args
|
||||||
from ansible.module_utils.ec2 import HAS_BOTO3
|
from ansible.module_utils.ec2 import HAS_BOTO3
|
||||||
from ansible.modules.cloud.amazon import iam_password_policy
|
|
||||||
|
|
||||||
if not HAS_BOTO3:
|
if not HAS_BOTO3:
|
||||||
pytestmark = pytest.mark.skip("iam_password_policy.py requires the `boto3` and `botocore` modules")
|
pytestmark = pytest.mark.skip("iam_password_policy.py requires the `boto3` and `botocore` modules")
|
||||||
|
else:
|
||||||
|
import boto3
|
||||||
|
from ansible.modules.cloud.amazon import iam_password_policy
|
||||||
|
|
||||||
def test_warn_if_state_not_specified():
|
def test_warn_if_state_not_specified():
|
||||||
set_module_args({
|
set_module_args({
|
||||||
|
|
Loading…
Reference in a new issue