mirror of
https://github.com/sstent/go-garth.git
synced 2026-01-27 17:41:57 +00:00
sync
This commit is contained in:
17
python-garth/tests/test_auth_tokens.py
Normal file
17
python-garth/tests/test_auth_tokens.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import time
|
||||
|
||||
from garth.auth_tokens import OAuth2Token
|
||||
|
||||
|
||||
def test_is_expired(oauth2_token: OAuth2Token):
|
||||
oauth2_token.expires_at = int(time.time() - 1)
|
||||
assert oauth2_token.expired is True
|
||||
|
||||
|
||||
def test_refresh_is_expired(oauth2_token: OAuth2Token):
|
||||
oauth2_token.refresh_token_expires_at = int(time.time() - 1)
|
||||
assert oauth2_token.refresh_expired is True
|
||||
|
||||
|
||||
def test_str(oauth2_token: OAuth2Token):
|
||||
assert str(oauth2_token) == "Bearer bar"
|
||||
Reference in New Issue
Block a user