'Test attach deleted volume should fail with info to log'

def test_attach_deleted_volume_should_fail_with_info_to_log(self):

    driver = mock.MagicMock()
    driver.VERSION = 'VERSION'
    p = self.proxy(self.default_storage_info, mock.MagicMock(), test_mock.cinder.exception, driver)
    p.ibm_storage_cli = mock.MagicMock()
    mock_log = mock.MagicMock()
    setattr(p, '_log', mock_log)
    p.ibm_storage_cli = mock.MagicMock()
    p.ibm_storage_cli.cmd.vol_mapping_list.side_effect = errors.VolumeBadNameError('bla', 'bla', ElementTree.Element('Bla'))
    p._define_host_according_to_chap = mock.MagicMock()
    p._define_host_according_to_chap.return_value = dict(id=100)
    ex = getattr(p, '_get_exception')()
    self.assertRaises(ex, p.initialize_connection, TEST_VOLUME, TEST_CONNECTOR)
