def test__prepare_pxe_boot_manage_tftp_false( self, pxe_info_mock, options_mock, create_mock, cache_mock): self.config(manage_tftp=False, group='agent') with task_manager.acquire( self.context, self.node['uuid'], shared=False) as task: agent._prepare_pxe_boot(task) self.assertFalse(pxe_info_mock.called) self.assertFalse(options_mock.called) self.assertFalse(create_mock.called) self.assertFalse(cache_mock.called)
def test__prepare_pxe_boot(self, pxe_info_mock, options_mock, create_mock, cache_mock): with task_manager.acquire( self.context, self.node['uuid'], shared=False) as task: agent._prepare_pxe_boot(task) pxe_info_mock.assert_called_once_with(task.node) options_mock.assert_called_once_with(task.node, mock.ANY) create_mock.assert_called_once_with( task, mock.ANY, CONF.agent.agent_pxe_config_template) cache_mock.assert_called_once_with(task.context, task.node, mock.ANY)