def auth_ctrl(self, pyramid_config, pyramid_request): """ Configure a valid request for `OAuthAuthorizeController.get`. """ pyramid_config.testing_securitypolicy('acct:[email protected]') pyramid_request.GET['client_id'] = 'valid_id' pyramid_request.GET['response_mode'] = 'web_message' pyramid_request.GET['response_type'] = 'code' pyramid_request.GET['state'] = 'a_random_string' return views.OAuthAuthorizeController(pyramid_request)
def test_it_inits_oauthlib_client(self, pyramid_request, oauth_validator, patch): oauth_cls = patch('h.views.api_auth.WebApplicationServer') views.OAuthAuthorizeController(pyramid_request) oauth_cls.assert_called_once_with(oauth_validator)
def controller(self, oauth_server, pyramid_request): return views.OAuthAuthorizeController(pyramid_request, oauth_server=oauth_server)
def controller(self, pyramid_request): pyramid_request.override_renderer = None return views.OAuthAuthorizeController(None, pyramid_request)
def controller(self, pyramid_request): return views.OAuthAuthorizeController(None, pyramid_request)