'Ensure initiator iqns are handled in a case-insensitive manner.'

@mock.patch.object(rtslib_fb, 'MappedLUN')
@mock.patch.object(rtslib_fb, 'NodeACL')
@mock.patch.object(rtslib_fb.root, 'RTSRoot')
def test_add_initiator_acl_exists_case_1(self, rtsroot, node_acl, mapped_lun):

    target_iqn = mock.MagicMock()
    target_iqn.tpgs.return_value = [{'node_acls': self.INITIATOR_IQN.lower()}]
    acl = mock.MagicMock(node_wwn=self.INITIATOR_IQN)
    tpg = mock.MagicMock(node_acls=[acl])
    tpgs = iter([tpg])
    target = mock.MagicMock(tpgs=tpgs, wwn=target_iqn)
    rtsroot.return_value = mock.MagicMock(targets=[target])
    cinder_rtstool.add_initiator(target_iqn, self.INITIATOR_IQN, mock.sentinel.userid, mock.sentinel.password)
    self.assertFalse(node_acl.called)
    self.assertFalse(mapped_lun.called)
