#NEWLINE# def test_timeout( self ) : #NEWLINE# #INDENT# def handle_response( resp , n ) : #NEWLINE# #INDENT# self . assertFalse ( resp [ 0 ] ) #NEWLINE# self . assertIsNone ( resp [ 1 ] ) #NEWLINE# #UNINDENT# n = Node ( digest ( 'S' ) , self . addr1 [ 0 ] , self . addr1 [ 1 ] ) #NEWLINE# d = defer . Deferred ( ) . addCallback ( handle_response , n ) #NEWLINE# self . protocol . _outstanding [ 'msgID' ] = [ d , self . addr1 , reactor . callLater ( 5 , handle_response ) ] #NEWLINE# self . protocol . router . addContact ( n ) #NEWLINE# self . protocol . timeout ( n )