

def test_create_port_with_sg_and_port_security_enabled_true(self):
    sg1 = self._create_sg_template(name='test1').get('security_group')
    net = self._create_network()
    self._create_port(network_id=net['network']['id'], security_groups=[sg1['id']], port_security_enabled=True, device_id=test_security_groups.FAKE_UUID1)
    security_group_api = self.controller.security_group_api
    sgs = self.get_instance_security_groups(context.get_admin_context(), instance_obj.Instance(uuid=test_security_groups.FAKE_UUID1))
    self.assertEqual(sgs, [{
        'name': 'test1',
    }])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_neutron_security_groups.py TestNeutronSecurityGroupsV21.test_create_port_with_sg_and_port_security_enabled_true/VarMisuse@78/130 `security_group_api`->`self`