parent
8f41270a01
commit
91150423f4
1 changed files with 4 additions and 11 deletions
|
@ -4,13 +4,14 @@
|
||||||
''' unit tests for module_utils netapp.py '''
|
''' unit tests for module_utils netapp.py '''
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
from ansible.module_utils.ansible_release import __version__ as ansible_version
|
||||||
|
|
||||||
import pytest
|
|
||||||
import ansible.module_utils.netapp as netapp_utils
|
import ansible.module_utils.netapp as netapp_utils
|
||||||
|
|
||||||
HAS_NETAPP_LIB = netapp_utils.has_netapp_lib()
|
if not netapp_utils.has_netapp_lib():
|
||||||
HAS_NETAPP_LIB_MSG = "pip install netapp_lib is required"
|
pytestmark = pytest.mark.skip("skipping as missing required netapp_lib")
|
||||||
|
|
||||||
|
|
||||||
class MockONTAPConnection(object):
|
class MockONTAPConnection(object):
|
||||||
|
@ -42,14 +43,6 @@ class MockONTAPConnection(object):
|
||||||
return xml
|
return xml
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def has_zapi():
|
|
||||||
assert HAS_NETAPP_LIB, HAS_NETAPP_LIB_MSG
|
|
||||||
|
|
||||||
|
|
||||||
pytestmark = pytest.mark.usefixtures("has_zapi")
|
|
||||||
|
|
||||||
|
|
||||||
def test_ems_log_event_version():
|
def test_ems_log_event_version():
|
||||||
''' validate Ansible version is correctly read '''
|
''' validate Ansible version is correctly read '''
|
||||||
source = 'unittest'
|
source = 'unittest'
|
||||||
|
|
Loading…
Reference in a new issue