Example #1
0
 def test_two_stage_oauth(self):
     if self.test_settings['oauth']:
         zachaysan = User(403022, force_fn_call=True)
         verify_url = zachaysan.five_hundred_px.verify_url
         zachaysan.initialize_authorization()
         # Normally, at this point, you would break this into 
         # the section of code that the user would hit on your site
         # *after* they finished authorizing (so the webserver would 
         # pick it up there) but since I don't want to run the tests
         # as a web server + client, I'm re-creating the lightweight 
         # verifier app.
         oauth_token = zachaysan._oauth_token
         oauth_verifier = retrieve_oauth_verifier(oauth_token, verify_url)
         zachaysan.complete_authorization(oauth_verifier)
         self.assertTrue(zachaysan.auth)
Example #2
0
 def test_two_stage_oauth(self):
     if self.test_settings['oauth']:
         zachaysan = User(403022, force_fn_call=True)
         verify_url = zachaysan.five_hundred_px.verify_url
         zachaysan.initialize_authorization()
         # Normally, at this point, you would break this into
         # the section of code that the user would hit on your site
         # *after* they finished authorizing (so the webserver would
         # pick it up there) but since I don't want to run the tests
         # as a web server + client, I'm re-creating the lightweight
         # verifier app.
         oauth_token = zachaysan._oauth_token
         oauth_verifier = retrieve_oauth_verifier(oauth_token, verify_url)
         zachaysan.complete_authorization(oauth_verifier)
         self.assertTrue(zachaysan.auth)