'This method also tests _create_igroup_add_initiators.'

@mock.patch.object(uuid, 'uuid4', mock.Mock(return_value=fake.UUID1))
def test_get_or_create_igroup_none_preexisting(self):

    self.zapi_client.get_igroup_by_initiators.return_value = []
    (igroup_name, os, ig_type) = self.library._get_or_create_igroup(fake.FC_FORMATTED_INITIATORS, 'fcp', 'linux')
    self.assertEqual(('openstack-' + fake.UUID1), igroup_name)
    self.zapi_client.create_igroup.assert_called_once_with(igroup_name, 'fcp', 'linux')
    self.assertEqual(len(fake.FC_FORMATTED_INITIATORS), self.zapi_client.add_igroup_initiator.call_count)
    self.assertEqual('linux', os)
    self.assertEqual('fcp', ig_type)
