summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2016-12-20 16:51:35 -0200
committerRuben Pollan <meskio@sindominio.net>2017-12-03 20:43:34 +0100
commit3a9c3ca2663aa4fdcacfe0a3d73061ec1946c54a (patch)
treee9dcca401d784685da097c38fedf270e59fda852 /tests/integration
parentd16472f0e74c584c194d96ec97f6fe1d37b38c43 (diff)
[bug] fix expected new_expiry_date
Previously, new_expiry_date was calculated by the key creation date + 1 week, but the proper behavior is today + 1 week, accordingly with gpg behavior.
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/keymanager/test_keymanager.py9
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)