def METHOD_NAME(connected_ssh_client, mock_paramiko_ssh_client):
    mock_sftp_client = MagicMock(spec=paramiko.SFTPClient)
    mock_sftp_client.__enter__.return_value.putfo.side_effect = Exception
    mock_paramiko_ssh_client.open_sftp.return_value = mock_sftp_client
    with pytest.raises(Exception):
        connected_ssh_client.copy_file(FILE_BUFFER, DESTINATION_PATH)