test_init.py 文件源码

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

项目:hop 作者: dudadornelles 项目源码 文件源码
def test_importing_htpasswd_should_show_error_message_if_cant_find_it(self, mock_sys, mock_logging, mock_sh_htpasswd):
        mock_sh_htpasswd.side_effect = sh.CommandNotFound()

        htpasswd_fn()

        mock_logging.error.assert_called_with("'htpasswd' not found in the path. Install 'htpasswd' and try again")
        mock_sys.exit.assert_called_with(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号