def testBrokenDownload(self):
# test what happens when download gets disconnected in the middle
d = client.getPage(self.getURL("broken"))
d = self.assertFailure(d, client.PartialDownloadError)
d.addCallback(lambda exc: self.assertEquals(exc.response, "abc"))
return d
评论列表
文章目录