#NEWLINE# def test_request( self ) : #NEWLINE# #INDENT# gw = gateway . BaseGateway ( ) #NEWLINE# echo = ( lambda x : x ) #NEWLINE# gw . addService ( echo , 'echo' , description = 'This is a test' ) #NEWLINE# envelope = remoting . Envelope ( ) #NEWLINE# request = remoting . Request ( 'echo' ) #NEWLINE# envelope [ '/1' ] = request #NEWLINE# request . headers [ 'DescribeService' ] = None #NEWLINE# processor = gw . getProcessor ( request ) #NEWLINE# response = processor ( request ) #NEWLINE# self . assertEqual ( response . status , remoting . STATUS_OK ) #NEWLINE# self . assertEqual ( response . body , 'This is a test' )