kopia lustrzana https://github.com/tsileo/little-boxes
More tests
rodzic
0c880eac35
commit
af71e6208c
|
@ -0,0 +1,18 @@
|
|||
from little_boxes.key import Key
|
||||
|
||||
|
||||
def test_key_new_load():
|
||||
owner = "http://lol.com"
|
||||
k = Key(owner)
|
||||
k.new()
|
||||
|
||||
assert k.to_dict() == {
|
||||
"id": f"{owner}#main-key",
|
||||
"owner": owner,
|
||||
"publicKeyPem": k.pubkey_pem,
|
||||
}
|
||||
|
||||
k2 = Key(owner)
|
||||
k2.load(k.privkey_pem)
|
||||
|
||||
assert k2.to_dict() == k.to_dict()
|
Ładowanie…
Reference in New Issue