'Make sure snaps already owned by cinder are flagged as unsafe.'

def test_get_manageable_snapshots_already_managed(self):

    cinder_vol = fake_volume.fake_volume_obj(mock.MagicMock())
    cinder_vol.id = VOLUME_ID
    cinder_snap = fake_snapshot.fake_snapshot_obj(mock.MagicMock())
    cinder_snap.id = SNAPSHOT_ID
    cinder_snap.volume = cinder_vol
    cinder_snaps = [cinder_snap]
    purity_snaps = deepcopy(MANAGEABLE_PURE_SNAPS)
    purity_snaps[0]['name'] = ('volume-%s-cinder.snapshot-%s' % (VOLUME_ID, SNAPSHOT_ID))
    expected_refs = deepcopy(MANAGEABLE_PURE_SNAP_REFS)
    expected_refs[0]['reference'] = {'name': purity_snaps[0]['name']}
    expected_refs[0]['safe_to_manage'] = False
    expected_refs[0]['reason_not_safe'] = 'Snapshot    already    managed.'
    expected_refs[0]['cinder_id'] = SNAPSHOT_ID
    self._test_get_manageable_things(pure_objs=purity_snaps, expected_refs=expected_refs, cinder_objs=cinder_snaps, pure_hosts=[PURE_HOST], is_snapshot=True)
