def setUp(self): RauthTestCase.setUp(self) # mock service for testing service = OflyService('example', consumer_key='123', consumer_secret='456', authorize_url='http://example.com/authorize') self.service = service
def setUp(self): RauthTestCase.setUp(self) # mock service for testing service = OflyService(name='example', consumer_key='123', consumer_secret='456', authorize_url='http://example.com/authorize') self.service = service
def setUp(self): RauthTestCase.setUp(self) # mock service for testing service = OAuth2Service( 'example', consumer_key='123', consumer_secret='456', access_token_url='http://example.com/access_token', authorize_url='http://example.com/authorize') self.service = service
def setUp(self): RauthTestCase.setUp(self) # mock service for testing service = OAuth1Service( 'example', consumer_key='123', consumer_secret='456', request_token_url='http://example.com/request_token', access_token_url='http://example.com/access_token', authorize_url='http://example.com/authorize') self.service = service # mock response content self.response.content = 'oauth_token=123&oauth_token_secret=456'
def setUp(self): RauthTestCase.setUp(self) self.authorize_url = 'http://example.com/authorize' self.base_url = 'http://example.com/api/' self.service = OflyService(self.app_id, self.app_secret, name='service', authorize_url=self.authorize_url, base_url=self.base_url) self.session = self.service.get_session(self.user_id) # patch self.session.request = self.fake_request self.service.get_session = self.fake_get_session
def setUp(self): RauthTestCase.setUp(self) self.access_token_url = 'https://example.com/access' self.authorize_url = 'https://example.com/authorize' self.base_url = 'https://example/api/' self.service = OAuth2Service(self.client_id, self.client_secret, access_token_url=self.access_token_url, authorize_url=self.authorize_url, base_url=self.base_url) self.session = self.service.get_session(self.access_token) # patches self.session.request = self.fake_request self.service.get_session = self.fake_get_session
def setUp(self): RauthTestCase.setUp(self) # Use JSON as the response type for OAuth2. RauthTestCase sets up # for OAuth1. self.response.content = \ '{"access_token": "321", "token_type": "Bearer"}' self.response.headers = \ {'content-type': 'application/json;charset=ISO-8859-1'} # mock service for testing service = OAuth2Service( name='example', consumer_key='123', consumer_secret='456', access_token_url='http://example.com/access_token', authorize_url='http://example.com/authorize', base_url='http://example.com/api/', access_token='987') self.service = service
def setUp(self): RauthTestCase.setUp(self) self.request_token_url = 'http://example.com/request' self.access_token_url = 'http://example.com/access' self.authorize_url = 'http://example.com/authorize' self.base_url = 'http://example.com/api/' self.service = OAuth1Service(self.consumer_key, self.consumer_secret, name='service', request_token_url=self.request_token_url, access_token_url=self.access_token_url, authorize_url=self.authorize_url, base_url=self.base_url) self.session = self.service.get_session(('123', '456')) # patches self.session.request = self.fake_request self.service.get_session = self.fake_get_session
def setUp(self): RauthTestCase.setUp(self) self.session = OAuth2Session('123', '345') self.session_no_creds = OAuth2Session()
def setUp(self): RauthTestCase.setUp(self) self.session = OAuth1Session('123', '345')