moved from deprecated "datetime.utcnow()" to "datetime.now(UTC)"

This commit is contained in:
Oscar Krause
2024-12-02 09:42:41 +01:00
parent ea8a66d449
commit 03b9b4a598
3 changed files with 16 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import sys
from base64 import b64encode as b64enc
from calendar import timegm
from datetime import datetime
from datetime import datetime, UTC
from hashlib import sha256
from os.path import dirname, join
from uuid import uuid4, UUID
@@ -142,7 +142,7 @@ def test_auth_v1_code():
def test_auth_v1_token():
cur_time = datetime.utcnow()
cur_time = datetime.now(UTC)
access_expires_on = cur_time + relativedelta(hours=1)
payload = {