Private
Public Access
1
0

updated tests

This commit is contained in:
Sander Roosendaal
2018-06-26 22:00:57 +02:00
parent e0dd903d68
commit ac0fc4a355
3 changed files with 23 additions and 6 deletions

View File

@@ -184,11 +184,14 @@ def imports_get_token(
if response.status_code == 200 or response.status_code == 201:
token_json = response.json()
thetoken = token_json['access_token']
expires_in = token_json['expires_in']
try:
refresh_token = token_json['refresh_token']
except KeyError:
refresh_token = refreshtoken
refresh_token = ''
try:
expires_in = token_json['expires_in']
except KeyError:
expires_in = 0
try:
expires_in = int(expires_in)
except (ValueError,TypeError):