def test_delete_sg(self):
    test_data = [('sg1', 'sg1'), ('sg1', 'sg2')]
    ids = []
    for (sg_id, remote_sg_id) in test_data:
        ids.append(self.conj_id_map.get_conj_id(sg_id, remote_sg_id, firewall.INGRESS_DIRECTION, constants.IPv6))
    result = self.conj_id_map.delete_sg('sg1')
    self.assertIn(('sg1', ids[0]), result)
    self.assertIn(('sg2', ids[1]), result)
    self.assertFalse(self.conj_id_map.id_map)
    reallocated = self.conj_id_map.get_conj_id('sg-foo', 'sg-foo', firewall.INGRESS_DIRECTION, constants.IPv6)
    self.assertIn(reallocated, ids)
def test_delete_sg(self):
    test_data = [('sg1', 'sg1'), ('sg1', 'sg2')]
    ids = []
    for (sg_id, remote_sg_id) in test_data:
        ids.append(self.conj_id_map.get_conj_id(sg_id, remote_sg_id, firewall.INGRESS_DIRECTION, constants.IPv6))
    result = self.conj_id_map.delete_sg('sg1')
    self.assertIn(('sg1', ids[0]), result)
    self.assertIn(('sg2', ids[1]), result)
    self.assertFalse(self.conj_id_map.id_map)
    reallocated = self.conj_id_map.get_conj_id('sg-foo', 'sg-foo', firewall.INGRESS_DIRECTION, constants.IPv6)
    self.assertIn(reallocated, ids)