#NEWLINE# def test_supports_credentials( self ) : #NEWLINE# #INDENT# 'CORS Specification Section 6.1.3\n\n        If the resource supports credentials add a single\n        Access-Control-Allow-Origin header, with the value of the Origin header\n        as value, and add a single Access-Control-Allow-Credentials header with\n        the case-sensitive string "true" as value.\n\n        Otherwise, add a single Access-Control-Allow-Origin header, with\n        either the value of the Origin header or the string "*" as value.\n\n        NOTE: We never use the "*" as origin.\n        ' #NEWLINE# for method in self . methods : #NEWLINE# #INDENT# request = webob . Request . blank ( '/' ) #NEWLINE# request . method = method #NEWLINE# request . headers [ 'Origin' ] = 'http://valid.example.com' #NEWLINE# response = request . get_response ( request . application ) #NEWLINE# self . assertCORSResponse ( response , status = '200 OK' , allow_origin = 'http://valid.example.com' , max_age = None , allow_methods = None , allow_headers = None , allow_credentials = None , expose_headers = None , has_content_type = True ) #NEWLINE# #UNINDENT# for method in self . methods : #NEWLINE# #INDENT# request = webob . Request . blank ( '/' ) #NEWLINE# request . method = method #NEWLINE# request . headers [ 'Origin' ] = 'http://creds.example.com' #NEWLINE# response = request . get_response ( self . application ) #NEWLINE# self . assertCORSResponse ( response , status = '200 OK' , allow_origin = 'http://creds.example.com' , max_age = None , allow_methods = None , allow_headers = None , allow_credentials = 'true' , expose_headers = None , has_content_type = True )