#NEWLINE# def test_remove_contact_with_not_enough_RPC_fails( self ) : #NEWLINE# #INDENT# "\n        Ensures that the contact is not removed if it's failedRPCs counter is\n        less than constants.ALLOWED_RPC_FAILS\n        " #NEWLINE# parent_node_id = '0xdeadbeef' #NEWLINE# r = RoutingTable ( parent_node_id ) #NEWLINE# contact1 = PeerNode ( PUBLIC_KEY , '192.168.0.1' , 9999 , self . version , 0 ) #NEWLINE# contact1 . network_id = '0xa' #NEWLINE# contact2 = PeerNode ( PUBLIC_KEY , '192.168.0.2' , 9999 , self . version , 0 ) #NEWLINE# contact2 . network_id = '0xb' #NEWLINE# r . add_contact ( contact1 ) #NEWLINE# r . add_contact ( contact2 ) #NEWLINE# self . assertEqual ( len ( r . _buckets [ 0 ] ) , 2 ) #NEWLINE# r . remove_contact ( '0xb' ) #NEWLINE# self . assertEqual ( len ( r . _buckets [ 0 ] ) , 2 )