diff --git a/tests/test_decode_tokens.py b/tests/test_decode_tokens.py index bfa9a8a..9fb6d80 100644 --- a/tests/test_decode_tokens.py +++ b/tests/test_decode_tokens.py @@ -155,7 +155,7 @@ def test_never_expire_token(app): def test_nbf_token_in_future(app): - date_in_future = datetime.utcnow() + timedelta(seconds=30) + date_in_future = datetime.now(timezone.utc) + timedelta(seconds=30) with pytest.raises(ImmatureSignatureError): with app.test_request_context():