From 07cbe65875a6ea1772cbd4a28defc2c3ebbcaed4 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 10 Nov 2016 14:33:05 +0200 Subject: [PATCH] formats: improve test coverage --- trezor_agent/tests/test_formats.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trezor_agent/tests/test_formats.py b/trezor_agent/tests/test_formats.py index 77a0491..93fce86 100644 --- a/trezor_agent/tests/test_formats.py +++ b/trezor_agent/tests/test_formats.py @@ -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))