#NEWLINE# def test_get_forced_refresh_list( self ) : #NEWLINE# #INDENT# "\n        Ensures that keys from all k-buckets (no matter if they're stale or\n        not) are returned.\n        " #NEWLINE# parent_node_id = '0xdeadbeef' #NEWLINE# r = RoutingTable ( parent_node_id ) #NEWLINE# bucket1 = Bucket ( 1 , 2 ) #NEWLINE# bucket1 . last_accessed = ( int ( time . time ( ) ) - 3700 ) #NEWLINE# r . _buckets [ 0 ] = bucket1 #NEWLINE# bucket2 = Bucket ( 2 , 3 ) #NEWLINE# bucket2 . last_accessed = int ( time . time ( ) ) #NEWLINE# r . _buckets . append ( bucket2 ) #NEWLINE# result = r . get_refresh_list ( 0 , True ) #NEWLINE# self . assertEqual ( 2 , len ( result ) ) #NEWLINE# self . assertEqual ( 1 , int ( result [ 0 ] , 0 ) ) #NEWLINE# self . assertEqual ( 2 , int ( r [ 1 ] , 0 ) )