#NEWLINE# def test_openSSLBuffering( self ) : #NEWLINE# #INDENT# serverProto = self . serverProto = SingleLineServerProtocol ( ) #NEWLINE# clientProto = self . clientProto = RecordingClientProtocol ( ) #NEWLINE# server = protocol . ServerFactory ( ) #NEWLINE# client = self . client = protocol . ClientFactory ( ) #NEWLINE# server . protocol = ( lambda : serverProto ) #NEWLINE# client . protocol = ( lambda : clientProto ) #NEWLINE# sCTX = ssl . DefaultOpenSSLContextFactory ( certPath , certPath ) #NEWLINE# cCTX = ssl . ClientContextFactory ( ) #NEWLINE# port = reactor . listenSSL ( 0 , server , sCTX , interface = '127.0.0.1' ) #NEWLINE# self . addCleanup ( port . stopListening ) #NEWLINE# reactor . connectSSL ( '127.0.0.1' , port . getHost ( ) . port , client , self ) #NEWLINE# return clientProto . deferred . addCallback ( self . assertEqual , b'+OK <some crap>\r\n' )