Skip to content

Commit 6fbb2a2

Browse files
committed
tests: Test sendpin with passphrase
Keepkey and Trezor had firmware changes that made sendpin not work when passphrase protection was enabled and a passphrase was provided. Modify the test to check for this case.
1 parent 2fa0c94 commit 6fbb2a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/test_keepkey.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def test_pins(self):
239239

240240
# Set a PIN
241241
device.wipe(self.client)
242-
load_device_by_mnemonic(client=self.client, mnemonic='alcohol woman abuse must during monitor noble actual mixed trade anger aisle', pin='1234', passphrase_protection=False, label='test')
242+
load_device_by_mnemonic(client=self.client, mnemonic='alcohol woman abuse must during monitor noble actual mixed trade anger aisle', pin='1234', passphrase_protection=True, label='test')
243243
self.client.call(messages.LockDevice())
244244
result = self.do_command(self.dev_args + ['enumerate'])
245245
for dev in result:
@@ -272,7 +272,7 @@ def test_pins(self):
272272
# Send the PIN
273273
self.client.open()
274274
pin = self.client.debug.encode_pin('1234')
275-
result = self.do_command(self.dev_args + ['sendpin', pin])
275+
result = self.do_command(self.dev_args + ["-p", "test", 'sendpin', pin])
276276
self.assertTrue(result['success'])
277277

278278
result = self.do_command(self.dev_args + ['enumerate'])

test/test_trezor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def test_pins(self):
289289
# Send the PIN
290290
self.client.open()
291291
pin = self.client.debug.encode_pin('1234')
292-
result = self.do_command(self.dev_args + ['sendpin', pin])
292+
result = self.do_command(self.dev_args + ["-p", "asdf", 'sendpin', pin])
293293
self.assertTrue(result['success'])
294294

295295
result = self.do_command(self.dev_args + ['enumerate'])

0 commit comments

Comments
 (0)