'Successfully build a map when zoning is enabled.'

def test_build_initiator_target_map(self):

    expected_targ_wwns = FC_TARGET_WWPNS
    self.driver.lookup_service = mock.Mock()
    self.driver.lookup_service.get_device_mapping_from_network.return_value = FC_FABRIC_MAP
    result = self.driver._build_initiator_target_map(CONNECTOR)
    (targ_wwns, init_targ_map) = result
    self.driver.lookup_service.get_device_mapping_from_network.assert_called_with(CONNECTOR['wwpns'], self.driver.gateway_fc_wwns)
    self.assertEqual(set(expected_targ_wwns), set(targ_wwns))
    i = FC_INITIATOR_WWPNS[0]
    self.assertIn(FC_TARGET_WWPNS[0], init_targ_map[i])
    self.assertIn(FC_TARGET_WWPNS[1], init_targ_map[i])
    self.assertEqual(2, len(init_targ_map[i]))
    i = FC_INITIATOR_WWPNS[1]
    self.assertIn(FC_TARGET_WWPNS[2], init_targ_map[i])
    self.assertIn(FC_TARGET_WWPNS[3], init_targ_map[i])
    self.assertEqual(2, len(init_targ_map[i]))
    self.assertEqual(2, len(init_targ_map))
