def test__handle_patches(self, patches_needed, po, _reboot, zypp):
"""
Given there are no updates patches.
Zypper returns 102 which should lead to a reboot.
But the reboot block should not be reached, therefore no reboot.
"""
patches_needed.return_value = False
po.return_value.returncode = 102
po.return_value.communicate.return_value = ("packages out", "error")
zypp._handle(strat='patch')
assert patches_needed.called is True
assert po.called is False
assert _reboot.called is False
评论列表
文章目录