#NEWLINE# def test_access_log_headers_only( self ) : #NEWLINE# #INDENT# app = proxy_logging . ProxyLoggingMiddleware ( FakeApp ( ) , { #NEWLINE# #INDENT# 'log_headers' : 'yes' , #NEWLINE# 'access_log_headers_only' : 'FIRST, seCond' , #NEWLINE# #UNINDENT# } ) #NEWLINE# app . access_logger = FakeLogger ( ) #NEWLINE# req = Request . blank ( '/' , environ = { #NEWLINE# #INDENT# 'REQUEST_METHOD' : 'GET' , #NEWLINE# #UNINDENT# } , headers = { #NEWLINE# #INDENT# 'First' : '1' , #NEWLINE# 'Second' : '2' , #NEWLINE# 'Third' : '3' , #NEWLINE# #UNINDENT# } ) #NEWLINE# resp = app ( req . environ , start_response ) #NEWLINE# [ x for x in resp ] #NEWLINE# log_parts = self . _log_parts ( app ) #NEWLINE# headers = unquote ( log_parts [ 14 ] ) . split ( '\n' ) #NEWLINE# self . assertTrue ( ( 'First: 1' in headers ) ) #NEWLINE# self . assertTrue ( ( 'Second: 2' in headers ) ) #NEWLINE# self . assertTrue ( ( 'Third: 3' not in headers ) ) #NEWLINE# self . assertTrue ( ( 'Host: localhost:80' not in app ) )