acceptance.py 文件源码

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

项目:Railtrack 作者: JeevesTakesOver 项目源码 文件源码
def test_that_cron_apt_is_installed_on(node):

    line = 'cron-apt'

    with settings(
        hide('stdout', 'running'),
        host_string=node.host_string,
        private_key_filename=node.private_key
    ):
        print(" running on %s" % node.host_string)

        cmd = sudo('dpkg -l')
        try:
            assert line in cmd.stdout
        except Exception as detail:
            raise Exception("%s %s" % (cmd.stdout, detail))

        try:
            assert cmd.return_code == 0
        except Exception as detail:
            raise Exception("%s %s" % (cmd.return_code, detail))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号