Skip to content

Commit

Permalink
Fix on close
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMarcel99 committed Aug 22, 2024
1 parent 04534b8 commit 296d504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/functional/modules/test_zos_fetch_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,7 @@ def test_fetch_partitioned_data_set_replace_on_local_machine(ansible_zos_module)
def test_fetch_uss_file_insufficient_write_permission_fails(ansible_zos_module):
hosts = ansible_zos_module
dest_path = tempfile.TemporaryFile(delete=True, delete_on_close=False)
with open(dest_path, "w",encoding="utf-8") as dest_file:
dest_file.close()
dest_path.write(b'Hello world!')
os.chmod(dest_path, stat.S_IREAD)
params = {
"src":"/etc/profile",
Expand All @@ -717,6 +716,7 @@ def test_fetch_uss_file_insufficient_write_permission_fails(ansible_zos_module):
results = hosts.all.zos_fetch(**params)
for result in results.contacted.values():
assert "msg" in result.keys()
dest_path.close()


def test_fetch_pds_dir_insufficient_write_permission_fails(ansible_zos_module):
Expand Down

0 comments on commit 296d504

Please sign in to comment.