Allow to skip test_aci_rest if no xmljson is installed

There is no such package in Fedora so building the Fedora package fails. See
e970237a2f_ffe3b87d/rpmbuild.log

Introduced by e970237a2f
pull/27152/head
Frederic Lepied 7 years ago committed by Matt Clay
parent 0229476c44
commit 7a02f2545a

@ -25,9 +25,12 @@ from ansible.modules.network.aci.aci_rest import aci_response
from nose.plugins.skip import SkipTest
from lxml import etree
if sys.version_info >= (2, 7):
try:
from lxml import etree
if sys.version_info >= (2, 7):
from xmljson import cobra
except ImportError:
raise SkipTest("aci Ansible modules require the lxml and xmljson Python libraries")
class AciRest(unittest.TestCase):

Loading…
Cancel
Save