#NEWLINE# def test_successful_connect( t = Time , logic = DEFAULT_LOGIC , nid = NID ( 'kaamel:123' ) ) : #NEWLINE# #INDENT# ( t , logic ) = ( t ( ) , logic ( ) ) #NEWLINE# emits_ ( logic . ensure_connected ( nid , t = t . current ) , [ ( Connect , nid2addr ( nid ) ) , ( Ping , OUT , nid , ANY ) ] ) #NEWLINE# emits_ ( logic . ping_received ( OUT , nid , 0 , t = t . advance ( by = 2.5 ) ) , [ ( Ping , OUT , nid , ANY ) ] ) #NEWLINE# return ( t , nid )