'Test lun id
Tests that a lun is provided if host is already
mapped to other volumes'

def test_get_lun_id_if_host_already_mapped(self):

    driver = mock.MagicMock()
    driver.VERSION = 'VERSION'
    p = self.proxy(self.default_storage_info, mock.MagicMock(), test_mock.cinder.exception, driver)
    p.ibm_storage_cli = mock.MagicMock()
    vol_mapping_list = p.ibm_storage_cli.cmd.vol_mapping_list
    vol_mapping_list.return_value.as_dict.return_value = {}
    lun1 = {'lun': 1}
    lun2 = {'lun': 2}
    p.ibm_storage_cli.cmd.mapping_list.return_value.as_list = [lun1, lun2]
    host = self._get_test_host()
    self.assertEqual(3, getattr(p, '_vol_map_and_get_lun_id')(TEST_VOLUME, TEST_CONNECTOR, host))
