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:
@@ -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:]
|
||||
|
||||
Reference in New Issue
Block a user