mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-08 22:40:59 +00:00
flake8: fix complaints (for the last time, hopefully)
This commit is contained in:
parent
6029a98414
commit
ca608d0a98
2
.flake8
2
.flake8
@ -22,3 +22,5 @@ ignore =
|
||||
E741,
|
||||
##### E266: too many leading '#' for block comment
|
||||
E266,
|
||||
# W503 line break before binary operator
|
||||
W503,
|
||||
|
@ -348,7 +348,7 @@ def load_device(connect, mnemonic, expand, xprv, pin, passphrase_protection, lab
|
||||
passphrase_protection,
|
||||
label,
|
||||
'english'
|
||||
)
|
||||
)
|
||||
if slip0014:
|
||||
return debuglink.load_device_by_mnemonic(
|
||||
client,
|
||||
@ -356,7 +356,7 @@ def load_device(connect, mnemonic, expand, xprv, pin, passphrase_protection, lab
|
||||
pin,
|
||||
passphrase_protection,
|
||||
'SLIP-0014'
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@cli.command(help='Start safe recovery workflow.')
|
||||
|
@ -22,6 +22,7 @@ from trezorlib.tools import parse_path
|
||||
|
||||
LISK_PATH = parse_path("m/44h/134h/0h/1h")
|
||||
|
||||
|
||||
@pytest.mark.lisk
|
||||
@pytest.mark.skip_t1
|
||||
class TestMsgLiskGetaddress(TrezorTest):
|
||||
|
@ -23,6 +23,7 @@ from trezorlib.tools import parse_path
|
||||
|
||||
LISK_PATH = parse_path("m/44h/134h/0h/0h")
|
||||
|
||||
|
||||
@pytest.mark.lisk
|
||||
@pytest.mark.skip_t1
|
||||
class TestMsgLiskGetPublicKey(TrezorTest):
|
||||
|
@ -39,7 +39,7 @@ class TestMsgLiskVerifymessage(TrezorTest):
|
||||
unhexlify('eb56d7bbb5e8ea9269405f7a8527fe126023d1db2c973cfac6f760b60ae27294'),
|
||||
unhexlify('7858ae7cd52ea6d4b17e800ca60144423db5560bfd618b663ffbf26ab66758563df45cbffae8463db22dc285dd94309083b8c807776085b97d05374d79867d05'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
|
||||
def test_verify_long(self):
|
||||
self.setup_mnemonic_nopin_nopassphrase()
|
||||
|
@ -41,7 +41,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'mirio8q3gtv7fhdnmb3TpZ4EuafdzSs7zL',
|
||||
unhexlify('209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert ret is True
|
||||
|
||||
def test_message_verify(self):
|
||||
@ -54,7 +54,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T',
|
||||
unhexlify('1ba77e01a9e17ba158b962cfef5f13dfed676ffc2b4bada24e58f784458b52b97421470d001d53d5880cf5e10e76f02be3e80bf21e18398cbd41e8c3b4af74c8c2'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is True
|
||||
|
||||
# uncompressed pubkey - FAIL - wrong sig
|
||||
@ -64,7 +64,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T',
|
||||
unhexlify('1ba77e01a9e17ba158b962cfef5f13dfed676ffc2b4bada24e58f784458b52b97421470d001d53d5880cf5e10e76f02be3e80bf21e18398cbd41e8c3b4af74c800'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
# uncompressed pubkey - FAIL - wrong msg
|
||||
@ -74,7 +74,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T',
|
||||
unhexlify('1ba77e01a9e17ba158b962cfef5f13dfed676ffc2b4bada24e58f784458b52b97421470d001d53d5880cf5e10e76f02be3e80bf21e18398cbd41e8c3b4af74c8c2'),
|
||||
'This is an example of a signed message!'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
# compressed pubkey - OK
|
||||
@ -93,7 +93,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'1C7zdTfnkzmr13HfA2vNm5SJYRK6nEKyq8',
|
||||
unhexlify('1f44e3e461f7ca9f57c472ce1a28214df1de1dadefb6551a32d1907b80c74d5a1fbfd6daaba12dd8cb06699ce3f6941fbe0f3957b5802d13076181046e741eaa00'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
# compressed pubkey - FAIL - wrong msg
|
||||
@ -112,7 +112,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'14LmW5k4ssUrtbAB4255zdqv3b4w1TuX9e',
|
||||
unhexlify('209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is True
|
||||
|
||||
# trezor pubkey - FAIL - wrong sig
|
||||
@ -122,7 +122,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'14LmW5k4ssUrtbAB4255zdqv3b4w1TuX9e',
|
||||
unhexlify('209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be00'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
# trezor pubkey - FAIL - wrong msg
|
||||
@ -132,7 +132,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'14LmW5k4ssUrtbAB4255zdqv3b4w1TuX9e',
|
||||
unhexlify('209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message!'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
def test_message_verify_bcash(self):
|
||||
@ -143,7 +143,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'bitcoincash:qqj22md58nm09vpwsw82fyletkxkq36zxyxh322pru',
|
||||
unhexlify('209e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is True
|
||||
|
||||
def test_verify_bitcoind(self):
|
||||
@ -155,7 +155,7 @@ class TestMsgVerifymessage(TrezorTest):
|
||||
'1KzXE97kV7DrpxCViCN3HbGbiKhzzPM7TQ',
|
||||
unhexlify('1cc694f0f23901dfe3603789142f36a3fc582d0d5c0ec7215cf2ccd641e4e37228504f3d4dc3eea28bbdbf5da27c49d4635c097004d9f228750ccd836a8e1460c0'),
|
||||
u'\u017elu\u0165ou\u010dk\xfd k\u016f\u0148 \xfap\u011bl \u010f\xe1belsk\xe9 \xf3dy'
|
||||
)
|
||||
)
|
||||
|
||||
assert res is True
|
||||
|
||||
|
@ -41,7 +41,7 @@ class TestMsgVerifymessageSegwit(TrezorTest):
|
||||
'2N4VkePSzKH2sv5YBikLHGvzUYvfPxV6zS9',
|
||||
unhexlify('249e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert ret is True
|
||||
|
||||
def test_message_verify(self):
|
||||
@ -54,7 +54,7 @@ class TestMsgVerifymessageSegwit(TrezorTest):
|
||||
'3CwYaeWxhpXXiHue3ciQez1DLaTEAXcKa1',
|
||||
unhexlify('249e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is True
|
||||
|
||||
# trezor pubkey - FAIL - wrong sig
|
||||
@ -64,7 +64,7 @@ class TestMsgVerifymessageSegwit(TrezorTest):
|
||||
'3CwYaeWxhpXXiHue3ciQez1DLaTEAXcKa1',
|
||||
unhexlify('249e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be00'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
# trezor pubkey - FAIL - wrong msg
|
||||
@ -74,7 +74,7 @@ class TestMsgVerifymessageSegwit(TrezorTest):
|
||||
'3CwYaeWxhpXXiHue3ciQez1DLaTEAXcKa1',
|
||||
unhexlify('249e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message!'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
def test_verify_utf(self):
|
||||
|
@ -41,7 +41,7 @@ class TestMsgVerifymessageSegwitNative(TrezorTest):
|
||||
'tb1qyjjkmdpu7metqt5r36jf872a34syws336p3n3p',
|
||||
unhexlify('289e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert ret is True
|
||||
|
||||
def test_message_verify(self):
|
||||
@ -54,7 +54,7 @@ class TestMsgVerifymessageSegwitNative(TrezorTest):
|
||||
'bc1qyjjkmdpu7metqt5r36jf872a34syws33s82q2j',
|
||||
unhexlify('289e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is True
|
||||
|
||||
# trezor pubkey - FAIL - wrong sig
|
||||
@ -64,7 +64,7 @@ class TestMsgVerifymessageSegwitNative(TrezorTest):
|
||||
'bc1qyjjkmdpu7metqt5r36jf872a34syws33s82q2j',
|
||||
unhexlify('289e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be00'),
|
||||
'This is an example of a signed message.'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
# trezor pubkey - FAIL - wrong msg
|
||||
@ -74,7 +74,7 @@ class TestMsgVerifymessageSegwitNative(TrezorTest):
|
||||
'bc1qyjjkmdpu7metqt5r36jf872a34syws33s82q2j',
|
||||
unhexlify('289e23edf0e4e47ff1dec27f32cd78c50e74ef018ee8a6adf35ae17c7a9b0dd96f48b493fd7dbab03efb6f439c6383c9523b3bbc5f1a7d158a6af90ab154e9be80'),
|
||||
'This is an example of a signed message!'
|
||||
)
|
||||
)
|
||||
assert res is False
|
||||
|
||||
def test_verify_utf(self):
|
||||
|
Loading…
Reference in New Issue
Block a user