#NEWLINE# @ pytest . inlineCallbacks #NEWLINE# def test_mangle_request_multiple( httprequest ) : #NEWLINE# #INDENT# orig_req = httprequest . copy ( ) #NEWLINE# macro = mock_int_macro ( modified_req = 'GET /cloud HTTP/1.1\r\n\r\n' ) #NEWLINE# macro2 = CloudToButtMacro ( ) #NEWLINE# intmacros = OrderedDict ( ) #NEWLINE# intmacros [ 'testmacro' ] = macro #NEWLINE# intmacros [ 'testmacro2' ] = macro2 #NEWLINE# ( new_req , mangled ) = ( yield macros . mangle_request ( orig_req , intmacros ) ) #NEWLINE# expected_req = Request ( 'GET /butt HTTP/1.1\r\n\r\n' ) #NEWLINE# assert ( new_req == expected_req ) #NEWLINE# assert ( httprequest == orig_req ) #NEWLINE# assert ( httprequest . unmangled is None ) #NEWLINE# assert ( new_req . unmangled == orig_req ) #NEWLINE# assert mangled