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)
test_exceptions.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录