1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

skip f5 tests when f5 lib not installed

This commit is contained in:
Brian Coca 2017-06-15 10:24:08 -04:00
parent 8ad04d6348
commit 83703e3137

View file

@ -22,8 +22,9 @@ __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 +41,12 @@ try:
from library.bigip_snmp import ModuleManager
from library.bigip_snmp import ArgumentSpec
except ImportError:
from ansible.modules.network.f5.bigip_snmp import Parameters
from ansible.modules.network.f5.bigip_snmp import ModuleManager
from ansible.modules.network.f5.bigip_snmp import ArgumentSpec
try:
from ansible.modules.network.f5.bigip_snmp import Parameters
from ansible.modules.network.f5.bigip_snmp import ModuleManager
from ansible.modules.network.f5.bigip_snmp import ArgumentSpec
except ImportError:
raise SkipTest("F5 Ansible modules the f5 python library")
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {}