Add more tests for the Key model. Remove the key_id field and made it a property derived from the fingerprint.

This commit is contained in:
Roberto Rosario
2016-03-23 11:58:08 -04:00
parent f82b2000c3
commit cd077cb076
10 changed files with 65 additions and 65 deletions

View File

@@ -3,9 +3,13 @@ from __future__ import absolute_import, unicode_literals
class KeyStub(object):
def __init__(self, raw):
self.key_id = raw['keyid']
self.fingerprint = raw['keyid']
self.key_type = raw['type']
self.date = raw['date']
self.expires = raw['expires']
self.length = raw['length']
self.uids = raw['uids']
@property
def key_id(self):
return self.fingerprint[-8:]