mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
chore(tests): drop unused debug pieces
This commit is contained in:
parent
33a9a14eab
commit
45d377f5b8
@ -68,8 +68,6 @@ class TestMsgRecoverydevice:
|
|||||||
ret = client.call_raw(proto.WordAck(word=word))
|
ret = client.call_raw(proto.WordAck(word=word))
|
||||||
fakes += 1
|
fakes += 1
|
||||||
|
|
||||||
print(mnemonic)
|
|
||||||
|
|
||||||
# Workflow succesfully ended
|
# Workflow succesfully ended
|
||||||
assert isinstance(ret, proto.Success)
|
assert isinstance(ret, proto.Success)
|
||||||
|
|
||||||
@ -120,8 +118,6 @@ class TestMsgRecoverydevice:
|
|||||||
ret = client.call_raw(proto.WordAck(word=word))
|
ret = client.call_raw(proto.WordAck(word=word))
|
||||||
fakes += 1
|
fakes += 1
|
||||||
|
|
||||||
print(mnemonic)
|
|
||||||
|
|
||||||
# Workflow succesfully ended
|
# Workflow succesfully ended
|
||||||
assert isinstance(ret, proto.Success)
|
assert isinstance(ret, proto.Success)
|
||||||
|
|
||||||
|
@ -14,39 +14,13 @@
|
|||||||
# You should have received a copy of the License along with this library.
|
# You should have received a copy of the License along with this library.
|
||||||
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
|
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||||
|
|
||||||
import struct
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from trezorlib import messages as proto, misc
|
from trezorlib import messages as proto, misc
|
||||||
from trezorlib.tools import H_
|
|
||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ..common import MNEMONIC12
|
||||||
|
|
||||||
|
|
||||||
def check_path(identity):
|
|
||||||
from hashlib import sha256
|
|
||||||
|
|
||||||
m = sha256()
|
|
||||||
m.update(struct.pack("<I", identity.index))
|
|
||||||
uri = ""
|
|
||||||
if identity.proto:
|
|
||||||
uri += identity.proto + "://"
|
|
||||||
if identity.user:
|
|
||||||
uri += identity.user + "@"
|
|
||||||
if identity.host:
|
|
||||||
uri += identity.host
|
|
||||||
if identity.port:
|
|
||||||
uri += ":" + identity.port
|
|
||||||
if identity.path:
|
|
||||||
uri += identity.path
|
|
||||||
m.update(uri)
|
|
||||||
print("hash:", m.hexdigest())
|
|
||||||
(a, b, c, d, _, _, _, _) = struct.unpack("<8I", m.digest())
|
|
||||||
address_n = [H_(13), H_(a), H_(b), H_(c), H_(d)]
|
|
||||||
print("path:", "m/" + "/".join([str(x) for x in address_n]))
|
|
||||||
|
|
||||||
|
|
||||||
class TestMsgSignidentity:
|
class TestMsgSignidentity:
|
||||||
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
@pytest.mark.setup_client(mnemonic=MNEMONIC12)
|
||||||
def test_sign(self, client):
|
def test_sign(self, client):
|
||||||
|
Loading…
Reference in New Issue
Block a user