mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-06 22:24:23 -07:00
error mock module
This commit is contained in:
parent
e97bc68499
commit
096f019aef
1 changed files with 8 additions and 1 deletions
|
@ -2,7 +2,13 @@ from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from unittest.mock import mock_open, patch, MagicMock
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from unittest.mock import mock_open, patch, MagicMock
|
||||||
|
except ImportError:
|
||||||
|
from mock import mock_open, patch, MagicMock
|
||||||
|
|
||||||
from plugins.modules.nfs_exports_info import get_exports
|
from plugins.modules.nfs_exports_info import get_exports
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,3 +63,4 @@ def test_get_exports_shares_per_ip(fake_exports_content):
|
||||||
|
|
||||||
assert result['exports_info'] == expected
|
assert result['exports_info'] == expected
|
||||||
assert result['file_digest'] == "fake_sha1_digest"
|
assert result['file_digest'] == "fake_sha1_digest"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue