#NEWLINE# def test_ssl_only_ssl_request_succeeds( self ) : #NEWLINE# #INDENT# ' Test that secure requests succeed when the backend requires all\n    AccessToken-authenticated requests to be secure, as recommended by\n    http://tools.ietf.org/html/rfc6750#section-1 and\n    http://tools.ietf.org/html/rfc6750#section-5.3 .\n    ' #NEWLINE# self . initialize ( scope_names = [ 'verify' ] ) #NEWLINE# settings . DJOAUTH2_SSL_ONLY = True #NEWLINE# access_token = self . create_access_token ( self . user , self . client ) #NEWLINE# api_request = self . oauth_client . make_api_request ( access_token , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , use_ssl = True ) #NEWLINE# api_endpoint = make_oauth_protected_endpoint ( 'verify' ) #NEWLINE# response = api_endpoint ( api_request ) #NEWLINE# self . assertIs ( response , True , response )