diff options
-rw-r--r-- | tests/integration/keymanager/test_keymanager.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/integration/keymanager/test_keymanager.py b/tests/integration/keymanager/test_keymanager.py index cacdc704..5b805ea4 100644 --- a/tests/integration/keymanager/test_keymanager.py +++ b/tests/integration/keymanager/test_keymanager.py @@ -662,16 +662,15 @@ class KeyManagerKeyManagementTestCase(KeyManagerWithSoledadTestCase): yield km.extend_key_expiration(validity='1w') - new_expiry_date = datetime.strptime( - KEY_EXPIRING_CREATION_DATE, '%Y-%m-%d') - new_expiry_date += timedelta(weeks=1) + new_expiry_date = date.today() + timedelta(weeks=1) + renewed_public_key = yield km.get_key(ADDRESS_EXPIRING, fetch_remote=False) renewed_private_key = yield km.get_key(ADDRESS_EXPIRING, private=True) - self.assertEqual(new_expiry_date.date(), + self.assertEqual(new_expiry_date, renewed_public_key.expiry_date.date()) - self.assertEqual(new_expiry_date.date(), + self.assertEqual(new_expiry_date, renewed_private_key.expiry_date.date()) self.assertEqual(key.fingerprint, renewed_public_key.fingerprint) self.assertEqual(key.fingerprint, renewed_private_key.fingerprint) |