test_packagemanager.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:DeepSea 作者: SUSE 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号