Skip to content

Commit c7848bb

Browse files
committed
clean up
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
1 parent fe16353 commit c7848bb

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

src/keri/app/keeping.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# -*- encoding: utf-8 -*-
23
"""
34
KERI
@@ -43,11 +44,11 @@
4344

4445

4546
class ExternModule:
46-
"""Base class for external key management (HSM, Trezor, eSIM).
47+
"""Base class for external key management.
4748
4849
Subclasses implement key generation and signing via external hardware
4950
security devices. The interface mirrors Manager.incept(), Manager.rotate(),
50-
and Manager.sign() so it integrates as a drop-in for the extern algorithm.
51+
and Manager.sign().
5152
"""
5253

5354
def incept(self, icodes=None, icount=1, icode=coring.MtrDex.Ed25519_Seed,
@@ -224,7 +225,7 @@ class Keeper(dbing.LMDBer):
224225
pres (subing.CesrSuber): named sub DB whose values are prefixes or first
225226
public keys
226227
Key is first public key in key sequence for a prefix (fully qualified qb64)
227-
Value is prefix or first public key (temporary) (fully qualified qb64
228+
Value is prefix or first public key (temporary) (fully qualified qb64)
228229
prms (koming.Komer): named sub DB whose values are serialized dicts of
229230
PrePrm instance
230231
Key is identifier prefix (fully qualified qb64)

tests/app/test_keeping.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@
3030
from keri.app import keeping
3131

3232

33+
def test_extern_module():
34+
"""Test ExternModule base class raises NotImplementedError for all methods"""
35+
mod = keeping.ExternModule()
36+
37+
with pytest.raises(NotImplementedError):
38+
mod.incept()
39+
40+
with pytest.raises(NotImplementedError):
41+
mod.rotate(pre="EExample")
42+
43+
with pytest.raises(NotImplementedError):
44+
mod.sign(ser=b"test")
45+
46+
3347
def test_dataclasses():
3448
"""
3549
test key set tracking and creation dataclasses

0 commit comments

Comments
 (0)