

def test_create_port_with_sg_and_port_security_enabled_false(self):
    sg1 = self._create_sg_template(name='test1').get('security_group')
    net = self._create_network()
    self.assertRaises(exception.SecurityGroupCannotBeApplied, self._create_port, network_id=net['network']['id'], security_groups=[sg1['id']], port_security_enabled=False, device_id=test_security_groups.FAKE_UUID1)

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_false/original