mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-05 21:54:22 -07:00
Errors1
This commit is contained in:
parent
d088911ed8
commit
07c0ac9390
1 changed files with 4 additions and 11 deletions
|
@ -52,8 +52,6 @@ def test_get_exports_ips_per_share(fake_exports_content):
|
|||
mock_module.file_exists.return_value = True
|
||||
mock_module.warn.return_value = None
|
||||
mock_module.fail_json.side_effect = Exception("fail_json called")
|
||||
|
||||
|
||||
patch_target = "builtins.open" if sys.version_info[0] == 3 else "__builtin__.open"
|
||||
|
||||
with patch(patch_target, mock_open(read_data=fake_exports_content.encode('utf-8'))):
|
||||
|
@ -77,14 +75,9 @@ def test_get_exports_ips_per_share(fake_exports_content):
|
|||
|
||||
def test_get_exports_shares_per_ip(fake_exports_content):
|
||||
mock_module = MagicMock()
|
||||
|
||||
|
||||
|
||||
mock_module.file_exists.return_value = True
|
||||
mock_module.warn.return_value = None
|
||||
mock_module.fail_json.side_effect = Exception("fail_json called")
|
||||
|
||||
|
||||
patch_target = "builtins.open" if sys.version_info[0] == 3 else "__builtin__.open"
|
||||
|
||||
with patch(patch_target, mock_open(read_data=fake_exports_content.encode('utf-8'))):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue