This commit is contained in:
2025-09-02 06:52:24 -07:00
commit 56f55daa85
179 changed files with 28841 additions and 0 deletions

View 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"