1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

tests: cleanup CardanoGetPublicKey test

This commit is contained in:
Pavol Rusnak 2018-09-07 19:22:57 +02:00
parent 5ef0c4d4cc
commit 51f178ef1a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -32,34 +32,31 @@ class TestMsgCardanoGetPublicKey(TrezorTest):
[
(
"m/44'/1815'/0'",
"c0fce1839f1a84c4e770293ac2f5e0875141b29017b7f56ab135352d00ad6966",
"07faa161c9f5464315d2855f70fdf1431d5fa39eb838767bf17b69772137452f",
b"c0fce1839f1a84c4e770293ac2f5e0875141b29017b7f56ab135352d00ad6966",
b"07faa161c9f5464315d2855f70fdf1431d5fa39eb838767bf17b69772137452f",
),
(
"m/44'/1815'/1'",
"ea5dde31b9f551e08a5b6b2f98b8c42c726f726c9ce0a7072102ead53bd8f21e",
"70f131bb799fd659c997221ad8cae7dcce4e8da701f8101cf15307fd3a3712a1",
b"ea5dde31b9f551e08a5b6b2f98b8c42c726f726c9ce0a7072102ead53bd8f21e",
b"70f131bb799fd659c997221ad8cae7dcce4e8da701f8101cf15307fd3a3712a1",
),
(
"m/44'/1815'/2'",
"076338cee5ab3dae19f06ccaa80e3d4428cf0e1bdc04243e41bba7be63a90da7",
"5dcdf129f6f2d108292e615c4b67a1fc41a64e6a96130f5c981e5e8e046a6cd7",
b"076338cee5ab3dae19f06ccaa80e3d4428cf0e1bdc04243e41bba7be63a90da7",
b"5dcdf129f6f2d108292e615c4b67a1fc41a64e6a96130f5c981e5e8e046a6cd7",
),
(
"m/44'/1815'/3'",
"5f769380dc6fd17a4e0f2d23aa359442a712e5e96d7838ebb91eb020003cccc3",
"1197ea234f528987cbac9817ebc31344395b837a3bb7c2332f87e095e70550a5",
b"5f769380dc6fd17a4e0f2d23aa359442a712e5e96d7838ebb91eb020003cccc3",
b"1197ea234f528987cbac9817ebc31344395b837a3bb7c2332f87e095e70550a5",
),
],
)
def test_cardano_get_public_key(self, path, public_key, chain_code):
self.setup_mnemonic_allallall()
root_hd_passphrase = None
key = get_public_key(self.client, parse_path(path))
assert hexlify(key.node.public_key).decode() == public_key
assert hexlify(key.node.chain_code).decode() == chain_code
assert key.xpub == public_key + chain_code
assert key.root_hd_passphrase == root_hd_passphrase
assert hexlify(key.node.public_key) == public_key
assert hexlify(key.node.chain_code) == chain_code
assert key.xpub.encode() == public_key + chain_code