Example #1
0
 def __init__(self):
     """
     Create a clock that can be used later in the tests.
     """
     NodeProtocol.__init__(self)
     self.clock = Clock()
     self.callLater = self.clock.callLater
Example #2
0
 def connectionLost(self, reason):
     """
     Upon close, notify factory.
     """
     NodeProtocol.connectionLost(self, reason)
     if self.factory._connectDeferred is not None:
         self.factory._connectDeferred.errback(reason)