formats: improve test coverage

This commit is contained in:
Roman Zeyde
2016-11-10 14:33:05 +02:00
parent 180120e787
commit 07cbe65875

View File

@@ -93,3 +93,11 @@ def test_curve_mismatch():
def test_serialize_error():
with pytest.raises(TypeError):
formats.serialize_verifying_key(None)
def test_get_ecdh_curve_name():
for c in [formats.CURVE_NIST256, formats.ECDH_CURVE25519]:
assert c == formats.get_ecdh_curve_name(c)
assert (formats.ECDH_CURVE25519 ==
formats.get_ecdh_curve_name(formats.CURVE_ED25519))