test_exceptions.py 文件源码

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

项目:python-gnocchiclient 作者: gnocchixyz 项目源码 文件源码
def test_resource_type_before_resource(self):
        r = models.Response()
        r.status_code = 404
        r.headers['Content-Type'] = "application/json"
        r._content = json.dumps(
            {"description": "Resource type foobar does not exist"}
        ).encode('utf-8')
        exc = exceptions.from_response(r)
        self.assertIsInstance(exc, exceptions.ResourceTypeNotFound)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号