test_tasks.py 文件源码

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

项目:fabricio 作者: renskiy 项目源码 文件源码
def test_skip_unknown_host(self):

        mocked_task = mock.Mock()

        @fabricio.tasks.skip_unknown_host
        def task():
            mocked_task()

        with fab.settings(fab.hide('everything')):
            fab.execute(task)
            mocked_task.assert_not_called()

            fab.execute(task, host='host')
            mocked_task.assert_called_once()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号