Example #1
0
 def test_valid_request(self):
     """update the tokens in the setUp"""
     osg_auth = OSGOAuth(self.consumer_key, self.consumer_secret,
             self.access_token, self.access_token_secret)
     resp = osg_auth.request("http://localhost:8080/oauth/info", parameters={'friends': 'kates'}, raw_response=True)
     logging.debug(resp)
     
     self.assertTrue(True)
Example #2
0
 def test_invalid_access_key(self):
     osg_auth = OSGOAuth(self.consumer_key, self.consumer_secret,
             'asdfas', 'asdfsd3')
     try:
         resp = osg_auth.request("http://localhost:8080/oauth/info", parameters={'friends': 'kates'}, raw_response=True)
         logging.debug(resp)
         self.assertTrue(False)
     except:
         self.assertTrue(True)
Example #3
0
 def test_invalid_consumer_key(self):
     """client should raise error from provider"""
     osg_auth = OSGOAuth('asdfasd', 'asdfas93',
             self.access_token, self.access_token_secret)
     try:
         resp = osg_auth.request("http://localhost:8080/oauth/info", parameters={'friends': 'kates'}, raw_response=True)
         logging.debug(resp)
         self.assertTrue(False)
     except:
         self.assertTrue(True)