def main(): auth = OAuthMethod(oauth_key, oauth_secret) auth.setRequestToken() print auth.buildAuthUrl() raw_input() auth.setAccessToken() reader = GoogleReader(auth) print reader.getUserInfo()
def test_full_auth_process_without_callback(self): auth = OAuthMethod(oauth_key, oauth_secret) auth.setRequestToken() auth_url = auth.buildAuthUrl() response = automated_oauth_approval(auth_url) auth.setAccessToken() reader = GoogleReader(auth) info = reader.getUserInfo() self.assertEqual(dict, type(info)) self.assertEqual(firstname, info['userName'])
def test_full_auth_process_without_callback(self): auth = OAuthMethod(oauth_key, oauth_secret) auth.setRequestToken() auth_url = auth.buildAuthUrl() response = automated_oauth_approval(auth_url) auth.setAccessToken() reader = GoogleReader(auth) info = reader.getUserInfo() self.assertEqual(dict, type(info)) self.assertEqual(firstname, info['userName'])