'Tests that a list of security groups passed in do not actually get
stored on with the instance when using neutron.'

def test_populate_instance_for_create_neutron_secgroups(self):

    self.flags(use_neutron=True)
    flavor = self._create_flavor()
    params = {'display_name': 'fake-instance'}
    instance = self._create_instance_obj(params, flavor)
    security_groups = objects.SecurityGroupList()
    security_groups.objects = [secgroup_obj.SecurityGroup(uuid=uuids.secgroup_id)]
    instance = self.compute_api._populate_instance_for_create(self.context, instance, {}, 0, security_groups, flavor, 1, False)
    self.assertEqual(0, len(instance.security_groups))
