

def test_cimc_handle_login_exception(self, mock_handle):
    info = cimc_common.parse_driver_info(self.node)
    with task_manager.acquire(self.context, self.node.uuid, shared=False) as task:
        with mock_handle(task) as handle:
            task.login.side_effect = imcsdk.ImcException('Boom')
            self.assertRaises(exception.CIMCException, cimc_common.handle_login, task, handle, info)
            handle.login.assert_called_once_with(self.node.driver_info['cimc_address'], self.node.driver_info['cimc_username'], self.node.driver_info['cimc_password'])

dataset/ETHPy150Open openstack/ironic/ironic/tests/unit/drivers/modules/cimc/test_common.py CIMCHandleLogin.test_cimc_handle_login_exception/VarMisuse@57/74 `handle`->`task`