test_err_handling.py 文件源码

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

项目:triggear 作者: futuresimple 项目源码 文件源码
def test__when_method_raises_github_exception__should_return_its_status__and_data_as_reason(self):
        @handle_exceptions()
        async def github_exception_raising_coro():
            raise github.GithubException(404, {'message': 'Not found'})

        response: aiohttp.web.Response = await github_exception_raising_coro()

        assert response.status == 404
        assert response.reason == "{'message': 'Not found'}"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号