#NEWLINE# @ mock . patch ( 'fbpush.push.logger.info' ) #NEWLINE# @ mock . patch . object ( push . JunoscriptRpc , '_handle_connection_close' ) #NEWLINE# def test_clientConnectionLost( self , mock_handler , mock_logger ) : #NEWLINE# #INDENT# 'Check the clientCOnnectionLost method.' #NEWLINE# reason = 'abc' #NEWLINE# self . mock_JunoscriptRpc . clientConnectionLost ( 'connector1' , reason ) #NEWLINE# msg = 'Connection lost to %s %s' #NEWLINE# mock_logger . assert_called_with ( msg , self . device . name , self ) #NEWLINE# mock_handler . assert_called_with ( )