From 581b6aed2e6e39061772206353ebcf20da329e60 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 22 Oct 2018 17:17:36 -0400 Subject: [PATCH] really skip if no boto3 makes no sense to check/skip after you already fail to import --- test/units/modules/cloud/amazon/test_iam_password_policy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/units/modules/cloud/amazon/test_iam_password_policy.py b/test/units/modules/cloud/amazon/test_iam_password_policy.py index f7076a4c867..6ae98fcd62b 100644 --- a/test/units/modules/cloud/amazon/test_iam_password_policy.py +++ b/test/units/modules/cloud/amazon/test_iam_password_policy.py @@ -1,13 +1,13 @@ -import boto3 import pytest from units.modules.utils import set_module_args from ansible.module_utils.ec2 import HAS_BOTO3 -from ansible.modules.cloud.amazon import iam_password_policy if not HAS_BOTO3: 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(): set_module_args({