'Test volume survives deletion if driver reports it as busy.'

def test_delete_busy_volume(self):

    volume = tests_utils.create_volume(self.context, **self.volume_params)
    volume_id = volume['id']
    self.volume.create_volume(self.context, volume)
    with mock.patch.object(self.volume.driver, 'delete_volume', side_effect=exception.VolumeIsBusy(volume_name='fake')) as mock_del_vol:
        self.volume.delete_volume(self.context, volume)
        volume_ref = db.volume_get(context.get_admin_context(), volume_id)
        self.assertEqual(volume_id, volume_ref.id)
        self.assertEqual('available', volume_ref.status)
        mock_del_vol.assert_called_once_with(volume)
