def test_get_remote_object_failure(self):
"""
If the factory fails to establish a connection the deferreds returned
by C{getRemoteObject} will fail.
"""
deferred = self.factory.getRemoteObject()
self.factory.continueTrying = False # Don't retry
self.factory.clientConnectionFailed(None, Failure(ConnectError()))
self.failureResultOf(deferred).trap(ConnectError)
评论列表
文章目录