#NEWLINE# def test_call( self ) : #NEWLINE# #INDENT# def preproc( sr , * args ) : #NEWLINE# #INDENT# self . called = True #NEWLINE# self . assertEqual ( args , tuple ( ) ) #NEWLINE# self . assertTrue ( isinstance ( sr , gateway . ServiceRequest ) ) #NEWLINE# #UNINDENT# gw = gateway . BaseGateway ( { #NEWLINE# #INDENT# 'test' : TestService , #NEWLINE# #UNINDENT# } , preprocessor = preproc ) #NEWLINE# envelope = remoting . Envelope ( ) #NEWLINE# request = remoting . Request ( 'test.spam' , envelope = request ) #NEWLINE# processor = gw . getProcessor ( request ) #NEWLINE# response = processor ( request ) #NEWLINE# self . assertTrue ( isinstance ( response , remoting . Response ) ) #NEWLINE# self . assertEqual ( response . status , remoting . STATUS_OK ) #NEWLINE# self . assertEqual ( response . body , 'spam' ) #NEWLINE# self . assertTrue ( self . called )