

def test_security_group_update(self):
    secgroup = self.api_q_secgroups.list()[1]
    secgroup = copy.deepcopy(secgroup)
    secgroup['name'] = 'newname'
    secgroup['description'] = 'new description'
    body = {
        'security_group': {
            'name': secgroup['name'],
            'description': secgroup['description'],
        },
    }
    self.qclient.update_security_group(secgroup['id'], body).AndReturn({
        'security_group': secgroup,
    })
    self.mox.ReplayAll()
    ret = api.network.security_group_update(self.request, secgroup['id'], 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_update/original