

def test_security_group_get(self):
    secgroup = self.api_q_secgroups.first()
    sg_ids = set(([secgroup['id']] + [sg_ids['remote_group_id'] for rule in secgroup['security_group_rules'] if rule['remote_group_id']]))
    related_sgs = [sg for sg in self.api_q_secgroups.list() if (sg['id'] in sg_ids)]
    self.qclient.show_security_group(secgroup['id']).AndReturn({
        'security_group': copy.deepcopy(secgroup),
    })
    self.qclient.list_security_groups(id=sg_ids, fields=['id', 'name']).AndReturn({
        'security_groups': related_sgs,
    })
    self.mox.ReplayAll()
    ret = api.network.security_group_get(self.request, secgroup['id'])
    self._cmp_sg(secgroup, ret)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/network_tests.py NetworkApiNeutronSecurityGroupTests.test_security_group_get/VarMisuse@33/46 `rule`->`sg_ids`