#NEWLINE# def test_streaming_send( self ) : #NEWLINE# #INDENT# trans = self . make_transport ( ) #NEWLINE# resp = trans . response = mock . Mock ( ) #NEWLINE# stop = trans . send ( 'text data' ) #NEWLINE# self . assertFalse ( stop ) #NEWLINE# self . assertEqual ( resp . size , len ( b'text data\n' ) ) #NEWLINE# resp . write . assert_called_with ( b'text data\n' ) #NEWLINE# trans . maxsize = 1 #NEWLINE# stop = trans . send ( 'text data' ) #NEWLINE# self . assertTrue ( stop )