def oauth_validator(self, pyramid_config, pyramid_request): svc = mock.Mock( spec=oauth_validator_service_factory(None, pyramid_request)) pyramid_config.register_service(svc, name='oauth_validator') return svc
def test_provides_user_service(self, pyramid_request, user_svc): svc = oauth_validator_service_factory(None, pyramid_request) assert svc.user_svc == user_svc
def test_provides_user_service(self, pyramid_request, user_svc): svc = oauth_validator_service_factory(None, pyramid_request) assert svc.user_svc == user_svc
def test_it_returns_oauth_service(self, pyramid_request): svc = oauth_validator_service_factory(None, pyramid_request) assert isinstance(svc, OAuthValidatorService)
def test_it_returns_oauth_service(self, pyramid_request): svc = oauth_validator_service_factory(None, pyramid_request) assert isinstance(svc, OAuthValidatorService)