test_resource.py 文件源码

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

项目:fluiddb 作者: fluidinfo 项目源码 文件源码
def testDelayedDisconnectDoesNotFinishRequest(self):
        """
        A C{CancelledError} exception is raised if content cannot be read
        from the request midway through processing, due to the client
        disconnecting.  In such cases, the C{Request.finish} method is not
        invoked by the L{handleRequestError} handler to avoid causing a
        failure in Twisted.
        """
        failure = Failure(CancelledError("Client disconnected partway."))
        handleRequestError(failure, self.request, self.resource)
        self.assertFalse(self.request.finished)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号