diff --git a/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py b/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py index 7e3e10ed6..ab1c77ed1 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py +++ b/monkey/tests/unit_tests/monkey_island/cc/server_utils/test_file_utils.py @@ -56,7 +56,7 @@ def _get_acl_and_sid_from_path(path: str): return acl, sid -def test_create_secure_directory__already_created(test_path): +def test_create_secure_directory__already_exists(test_path): os.mkdir(test_path) assert os.path.isdir(test_path) create_secure_directory(test_path) @@ -95,7 +95,7 @@ def test_create_secure_directory__perm_windows(test_path): assert permissions == FULL_CONTROL and ace_type == ACE_TYPE_ALLOW -def test_create_secure_file__already_created(test_path): +def test_get_file_descriptor_for_new_secure_file__already_exists(test_path): os.close(os.open(test_path, os.O_CREAT, stat.S_IRWXU)) assert os.path.isfile(test_path) @@ -103,13 +103,13 @@ def test_create_secure_file__already_created(test_path): get_file_descriptor_for_new_secure_file(test_path) -def test_create_secure_file__no_parent_dir(test_path_nested): +def test_get_file_descriptor_for_new_secure_file__no_parent_dir(test_path_nested): with pytest.raises(Exception): get_file_descriptor_for_new_secure_file(test_path_nested) @pytest.mark.skipif(is_windows_os(), reason="Tests Posix (not Windows) permissions.") -def test_create_secure_file__perm_linux(test_path): +def test_get_file_descriptor_for_new_secure_file__perm_linux(test_path): os.close(get_file_descriptor_for_new_secure_file(test_path)) st = os.stat(test_path) @@ -120,7 +120,7 @@ def test_create_secure_file__perm_linux(test_path): @pytest.mark.skipif(not is_windows_os(), reason="Tests Windows (not Posix) permissions.") -def test_create_secure_file__perm_windows(test_path): +def test_get_file_descriptor_for_new_secure_file__perm_windows(test_path): win32file.CloseHandle(get_file_descriptor_for_new_secure_file(test_path)) acl, user_sid = _get_acl_and_sid_from_path(test_path)