#NEWLINE# def test_put_headers_in_environ( self ) : #NEWLINE# #INDENT# environ = { #NEWLINE# #INDENT# 'SERVER_PORT' : '42' , #NEWLINE# 'REQUEST_METHOD' : 'GET' , #NEWLINE# #UNINDENT# } #NEWLINE# headers = wsgiref . headers . Headers ( [ ] ) #NEWLINE# headers [ 'Content-Length' ] = '2' #NEWLINE# headers [ 'X-User-IP' ] = '127.0.0.1' #NEWLINE# headers [ 'Access-Control-Allow-Origin' ] = 'google.com' #NEWLINE# util . put_headers_in_environ ( headers . items ( ) , environ ) #NEWLINE# self . assertEqual ( environ , { #NEWLINE# #INDENT# 'SERVER_PORT' : '42' , #NEWLINE# 'REQUEST_METHOD' : 'GET' , #NEWLINE# 'HTTP_CONTENT_LENGTH' : '2' , #NEWLINE# 'HTTP_X_USER_IP' : '127.0.0.1' , #NEWLINE# 'HTTP_ACCESS_CONTROL_ALLOW_ORIGIN' : 'google.com' , #NEWLINE# #UNINDENT# } )