'Return success for valid and unattached volume.'

@mock.patch('cinder.db.conditional_update', return_value=1)
@mock.patch('cinder.db.snapshot_update')
@mock.patch('cinder.volume.rpcapi.VolumeAPI.delete_snapshot')
def test_unmanage_snapshot_ok(self, mock_rpcapi, mock_db_update, mock_conditional_update):

    res = self._get_resp(snapshot_id)
    self.assertEqual(1, mock_rpcapi.call_count)
    self.assertEqual(3, len(mock_rpcapi.call_args[0]))
    self.assertEqual(0, len(mock_rpcapi.call_args[1]))
    self.assertEqual(http_client.ACCEPTED, res.status_int, res)
