

def test_stingy_scheduling(self):
    self._setup_cfg_agents(True, 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_1, self.hosting_device(template_id=hdt['id']) as hosting_device_2, self.hosting_device(template_id=hdt['id']) as hosting_device_3:
            hd1 = hosting_device_1['hosting_device']
            hd2 = hosting_device_3['hosting_device']
            hd3 = hosting_device_3['hosting_device']
            hd_ids = [hd1['id'], hd2['id'], hd3['id']]
            agents = self.plugin.get_cfg_agents_for_hosting_devices(self.adminContext, hd_ids, schedule=True)
            self.assertEqual(3, len(agents))
            self.assertNotEqual(agents[0]['id'], agents[1]['id'])
            self.assertNotEqual(agents[0]['id'], agents[2]['id'])
            self.assertNotEqual(agents[1]['id'], agents[2]['id'])

dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/cisco/device_manager/test_hosting_device_cfg_agent_scheduler.py HostingDeviceToCfgAgentStingySchedulerTestCase.test_stingy_scheduling/VarMisuse@98/172 `hosting_device_2`->`hosting_device_3`