the reverted commit claimed impossible dynamic values for the
statically-stored creation date and expiration date.

What has changed, though, is that now() is after the expiration date,
so we do need to change expired to True.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
Daniel Kahn Gillmor
2019-07-17 00:50:11 -04:00
parent 5f8c855e4f
commit 12ed9b3b71

View File

@@ -4,7 +4,7 @@ import pytest
import glob
import os
from datetime import datetime, timedelta
from datetime import datetime
from pgpy.constants import HashAlgorithm
from pgpy.constants import PubKeyAlgorithm
@@ -130,10 +130,10 @@ block_attrs = {
('type', 'encrypted')],
'tests/testdata/blocks/revochiio.asc':
[('created', datetime.utcnow() - timedelta(days=1)),
[('created', datetime(2014, 9, 11, 22, 55, 53)),
('fingerprint', "AE15 9FF3 4C1A 2426 B7F8 0F1A 560C F308 EF60 CFA3"),
('expires_at', datetime.utcnow() + timedelta(days=1)),
('is_expired', False),
('expires_at', datetime(2018, 9, 12, 1, 0, 59)),
('is_expired', True),
('is_primary', True),
('is_protected', False),
('is_public', True),