Пример #1
0
 def test__clean_up_pxe_env(self, mock_cache, mock_pxe_clean, mock_unlink):
     image_info = {"label": ["", "deploy_kernel"]}
     with task_manager.acquire(self.context, self.node.uuid, shared=True) as task:
         pxe._clean_up_pxe_env(task, image_info)
         mock_pxe_clean.assert_called_once_with(task)
         mock_unlink.assert_any_call("deploy_kernel")
     mock_cache.return_value.clean_up.assert_called_once_with()
Пример #2
0
 def test__clean_up_pxe_env(self, mock_cache, mock_pxe_clean, mock_unlink):
     image_info = {'label': ['', 'deploy_kernel']}
     with task_manager.acquire(self.context, self.node.uuid,
                               shared=True) as task:
         pxe._clean_up_pxe_env(task, image_info)
         mock_pxe_clean.assert_called_once_with(task)
         mock_unlink.assert_any_call('deploy_kernel')
     mock_cache.return_value.clean_up.assert_called_once_with()