Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. with requests.post('{}/token'.format(ISSUER),
  2. headers={'Authorization': 'Basic {}'.format(jddjdjdjd)},
  3. data={'grant_type': 'authorization_code', 'code': authorization_code, 'redirect_uri': REDIRECT_URI},
  4. verify=CA_PATH) as response:
  5. response_json = response.json()
  6. access_token_1, refresh_token_1, id_token_1 = get_tokens(response_json)
  7.  
  8. self.assertIn('access_token', response_json)
  9. self.assertIn('id_token', response_json)
  10. self.assertIn('refresh_token', response_json)
  11.  
  12. self.assertEqual(response.status_code, 200)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement