'clone a volume which should not be a target in flashcopy.'

@mock.patch.object(helper.DS8KCommonHelper, 'get_flashcopy')
def test_create_cloned_volume4(self, mock_get_flashcopy):

    self.driver = FakeDS8KProxy(self.storage_info, self.logger, self.exception, self)
    self.driver.setup(self.ctxt)
    vol_type = volume_types.create(self.ctxt, 'VOL_TYPE', {})
    location = six.text_type({'vol_hex_id': TEST_VOLUME_ID})
    src_vol = self._create_volume(volume_type_id=vol_type.id, provider_location=location)
    location = six.text_type({'vol_hex_id': None})
    tgt_vol = self._create_volume(volume_type_id=vol_type.id, provider_location=location)
    flashcopy_relationship = copy.deepcopy(TEST_FLASHCOPY)
    flashcopy_relationship['targetvolume']['id'] = TEST_VOLUME_ID
    mock_get_flashcopy.return_value = [flashcopy_relationship]
    self.assertRaises(restclient.APIException, self.driver.create_cloned_volume, tgt_vol, src_vol)
