passing test_imports
This commit is contained in:
@@ -128,13 +128,17 @@ class SyncIntegration(metaclass=ABCMeta):
|
||||
try:
|
||||
expires_in = token_json['expires_in']
|
||||
except KeyError: # pragma: no cover
|
||||
expires_in = 0
|
||||
try:
|
||||
expires_at = arrow.get(token_json['expires_at']).timestamp()
|
||||
expires_in = expires_at - arrow.now().timestamp()
|
||||
except KeyError: # pragma: no cover
|
||||
expires_in = 0
|
||||
try:
|
||||
expires_in = int(expires_in)
|
||||
except (ValueError, TypeError): # pragma: no cover
|
||||
expires_in = 0
|
||||
else: # pragma: no cover
|
||||
raise NoTokenError("Failed to obtain token")
|
||||
else: # pragma: no cover
|
||||
raise NoTokenError("Failed to obtain token")
|
||||
|
||||
return [thetoken, expires_in, refresh_token]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user