'Return success for valid and unattached volume.'

@mock.patch('cinder.volume.rpcapi.VolumeAPI.delete_volume')
def test_unmanage_volume_ok(self, mock_rpcapi):

    vol = utils.create_volume(self.ctxt)
    res = self._get_resp(vol.id)
    self.assertEqual(http_client.ACCEPTED, res.status_int, res)
    mock_rpcapi.assert_called_once_with(self.ctxt, mock.ANY, True, False)
    vol = objects.volume.Volume.get_by_id(self.ctxt, vol.id)
    self.assertEqual('unmanaging', vol.status)
    db.volume_destroy(self.ctxt, vol.id)
