#NEWLINE# def test_application_options_response( self ) : #NEWLINE# #INDENT# 'Assert that an application provided OPTIONS response is honored.\n\n        If the underlying application, via middleware or other, provides a\n        CORS response, its response should be honored.\n        ' #NEWLINE# test_origin = 'http://creds.example.com' #NEWLINE# request = webob . Request . blank ( '/server_cors' ) #NEWLINE# request . method = 'GET' #NEWLINE# request . headers [ 'Origin' ] = test_origin #NEWLINE# request . headers [ 'Access-Control-Request-Method' ] = 'GET' #NEWLINE# response = request . get_response ( self . application ) #NEWLINE# self . assertNotIn ( 'Access-Control-Allow-Credentials' , response . headers ) #NEWLINE# self . assertEqual ( response . headers [ 'Access-Control-Allow-Origin' ] , test_origin ) #NEWLINE# self . assertEqual ( response . headers [ 'X-Server-Generated-Response' ] , '1' )