#NEWLINE# def test_recvdInLengthLimitExceeded( self ) : #NEWLINE# #INDENT# '\n        The L{IntNStringReceiver.recvd} buffer contains all data not yet\n        processed by L{IntNStringReceiver.dataReceived} if the\n        C{lengthLimitExceeded} event occurs.\n        ' #NEWLINE# proto = self . getProtocol ( ) #NEWLINE# DATA = 'too long' #NEWLINE# proto . MAX_LENGTH = ( len ( DATA ) - 1 ) #NEWLINE# message = self . makeMessage ( DATA , DATA ) #NEWLINE# result = [ ] #NEWLINE# def lengthLimitExceeded( length ) : #NEWLINE# #INDENT# result . append ( length ) #NEWLINE# result . append ( proto . recvd ) #NEWLINE# #UNINDENT# proto . lengthLimitExceeded = lengthLimitExceeded #NEWLINE# proto . dataReceived ( message ) #NEWLINE# self . assertEqual ( result [ 0 ] , len ( DATA ) ) #NEWLINE# self . assertEqual ( result [ 1 ] , message )