Skip to content

Commit

Permalink
fix hard-coded test date
Browse files Browse the repository at this point in the history
  • Loading branch information
Dax Harris committed Mar 29, 2024
1 parent d14125c commit 1f01e81
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_op_keys.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from datetime import timedelta
import os
from gpyg import *

Expand Down Expand Up @@ -49,8 +50,10 @@ def test_export(environment):

def test_expire_key(environment):
result = environment.keys.list_keys()[0]
result.set_expiration(expiration=datetime.date(2026, 1, 1), password="test-psk-0")
assert result.expiration_date.date() == datetime.date(2026, 1, 1)
result.set_expiration(
expiration=datetime.date.today() + timedelta(days=365), password="test-psk-0"
)
assert result.expiration_date.date() == datetime.date.today() + timedelta(days=365)


def test_key_passwords(environment):
Expand Down

0 comments on commit 1f01e81

Please sign in to comment.