mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 13:16:42 +08:00
protocol: add docstrings and replace custom exceptions
This commit is contained in:
@@ -38,7 +38,7 @@ def test_ecdsa_sign():
|
||||
def test_sign_missing():
|
||||
h = protocol.Handler(keys=[], signer=ecdsa_signer)
|
||||
|
||||
with pytest.raises(protocol.MissingKey):
|
||||
with pytest.raises(KeyError):
|
||||
h.handle(NIST256_SIGN_MSG)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ def test_sign_wrong():
|
||||
key = formats.import_public_key(NIST256_KEY)
|
||||
h = protocol.Handler(keys=[key], signer=wrong_signature)
|
||||
|
||||
with pytest.raises(protocol.BadSignature):
|
||||
with pytest.raises(ValueError):
|
||||
h.handle(NIST256_SIGN_MSG)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user