

def test_list_cfg_agents_handling_hosting_device(self):
    self._setup_cfg_agents(True, True)
    with self.hosting_device_template(host_category=self.host_category) as hosting_device_template:
        hdt = hosting_device_template['hosting_device_template']
        with self.hosting_device(template_id=hdt['id']) as hosting_device:
            hd = hosting_device['hosting_device']
            cfg_agent_id = self._agent_dict[L3_CFG_HOST_A]['id']
            self._assign_hosting_device_to_cfg_agent(cfg_agent_id, hd['id'])
            a_list = self._list_cfg_agents_handling_hosting_device(hd['id'])
            self.assertEqual(1, len(a_list['agents']))
            self.assertEqual(cfg_agent_id, a_list['agents'][0]['id'])

dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/cisco/device_manager/test_hosting_device_cfg_agent_scheduler.py HostingDeviceConfigAgentSchedulerTestCase.test_list_cfg_agents_handling_hosting_device/original