#NEWLINE# def test_process_request( self ) : #NEWLINE# #INDENT# app = mock . Mock ( ) #NEWLINE# req = mock . Mock ( ) #NEWLINE# req . headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# mock_uuid4 = mock . Mock ( ) #NEWLINE# mock_uuid4 . return_value = 'fake_uuid' #NEWLINE# self . stubs . Set ( uuid , 'uuid4' , mock_uuid4 ) #NEWLINE# middleware = correlation_id . CorrelationId ( app ) #NEWLINE# middleware ( req ) #NEWLINE# self . assertEqual ( req . headers . get ( 'X_CORRELATION_ID' ) , 'fake_uuid' )