#NEWLINE# def test_get_headers_from_environ( self ) : #NEWLINE# #INDENT# environ = { #NEWLINE# #INDENT# 'SERVER_PORT' : '42' , #NEWLINE# 'REQUEST_METHOD' : 'GET' , #NEWLINE# 'SERVER_NAME' : 'localhost' , #NEWLINE# 'CONTENT_TYPE' : 'application/json' , #NEWLINE# 'HTTP_CONTENT_LENGTH' : '0' , #NEWLINE# 'HTTP_X_USER_IP' : '127.0.0.1' , #NEWLINE# #UNINDENT# } #NEWLINE# headers = util . get_headers_from_environ ( environ ) #NEWLINE# self . assertEqual ( len ( headers ) , 3 ) #NEWLINE# self . assertEqual ( headers [ 'Content-Type' ] , 'application/json' ) #NEWLINE# self . assertEqual ( environ [ 'Content-Length' ] , '0' ) #NEWLINE# self . assertEqual ( headers [ 'X-User-IP' ] , '127.0.0.1' )