'test create snapshot'

@mock.patch.object(cnfs.VeritasCNFSDriver, '_get_vol_by_id')
@mock.patch.object(cnfs.VeritasCNFSDriver, '_do_clone_volume')
def test_create_snapshot(self, m_do_clone_volume, m_get_vol_by_id):

    drv = self.driver
    volume = fake_volume.fake_volume_obj(context.get_admin_context(), provider_location=self._loc)
    snapshot = fake_snapshot.fake_snapshot_obj(context.get_admin_context())
    snapshot.volume = volume
    m_get_vol_by_id.return_value = volume
    m_do_clone_volume(snapshot, snapshot.name, volume).return_value = True
    drv.create_snapshot(snapshot)
    self.assertEqual(volume.provider_location, snapshot.provider_location)
