Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zsimjee committed Mar 19, 2024
1 parent 01c6226 commit b6fe617
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit_tests/cli/server/test_hub_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import math

import pytest
from jwt import JWT, jwk_from_dict
Expand Down Expand Up @@ -42,7 +43,7 @@ def test_get_auth():


def test_get_jwt_token():
expiration = (datetime.datetime.now().timestamp() + 1000).__floor__()
expiration = math.floor(datetime.datetime.now().timestamp() + 1000)

jwk = jwk_from_dict(
{
Expand All @@ -64,7 +65,7 @@ def test_get_jwt_token():
assert get_jwt_token(Credentials.from_dict(creds)) == valid_jwt

with pytest.raises(Exception) as e:
expiration = (datetime.datetime.now().timestamp() - 1000).__floor__()
expiration = math.floor(datetime.datetime.now().timestamp() - 1000)
expired_jwt = JWT().encode(
{
"exp": expiration,
Expand Down

0 comments on commit b6fe617

Please sign in to comment.