From 342a85d33f036ac619edb44ad8ce7c902219b2b6 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 15 Jun 2017 12:29:35 -0400 Subject: [PATCH] fixed again --- .../modules/network/f5/test_bigip_virtual_address.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/units/modules/network/f5/test_bigip_virtual_address.py b/test/units/modules/network/f5/test_bigip_virtual_address.py index ea325f2af90..3879a8280a8 100644 --- a/test/units/modules/network/f5/test_bigip_virtual_address.py +++ b/test/units/modules/network/f5/test_bigip_virtual_address.py @@ -22,8 +22,8 @@ __metaclass__ = type import sys +from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): - from nose.plugins.skip import SkipTest raise SkipTest("F5 Ansible modules require Python >= 2.7") import os @@ -40,9 +40,12 @@ try: from library.bigip_virtual_address import ModuleManager from library.bigip_virtual_address import ArgumentSpec except ImportError: - from ansible.modules.network.f5.bigip_virtual_address import Parameters - from ansible.modules.network.f5.bigip_virtual_address import ModuleManager - from ansible.modules.network.f5.bigip_virtual_address import ArgumentSpec + try: + from ansible.modules.network.f5.bigip_virtual_address import Parameters + from ansible.modules.network.f5.bigip_virtual_address import ModuleManager + from ansible.modules.network.f5.bigip_virtual_address import ArgumentSpec + except ImportError: + raise SkipTest("This test requries F5 python libraries") fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') fixture_data = {}