

def test_create_server_get_default_security_group(self):
    url = '/v2/fake/servers'
    image_uuid = 'c905cedb-7281-47e4-8a62-f26bc5fc4c77'
    server = dict(name='server_test', imageRef=image_uuid, flavorRef=2)
    res = self._make_request(url, {
        'server': server,
    })
    self.assertEqual(res.status_int, 202)
    server = self._get_server(res.body)
    group = self._get_groups(server)[0]
    self.assertEqual(group.get('name'), 'default')

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_neutron_security_groups.py TestNeutronSecurityGroupsOutputTest.test_create_server_get_default_security_group/original