

def test_security_group_create(self):
    secgroup = self.api_q_secgroups.list()[1]
    body = {
        'security_group': {
            'name': secgroup['name'],
            'description': secgroup['description'],
            'tenant_id': self.request.user.project_id,
        },
    }
    self.qclient.create_security_group(body).AndReturn({
        'security_group': copy.deepcopy(secgroup),
    })
    self.mox.ReplayAll()
    ret = api.network.security_group_create(self.request, secgroup['name'], secgroup['description'])
    self._cmp_sg(secgroup, ret)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/network_tests.py NetworkApiNeutronSecurityGroupTests.test_security_group_create/original