Skip to content

Commit

Permalink
Merge #658: trezor: Add missing import and minor test fixes following…
Browse files Browse the repository at this point in the history
… passphrase changes

b8a379c test, trezor: Properly pass empty string passphrase (Andrew Chow)
c3f490f test, trezor: Check for warnings rather than needs_passphrase_sent (Andrew Chow)
203c844 trezor: Add missing NoPasswordError import (Andrew Chow)

Pull request description:

  Fixes a couple things were missed following #644 which are causing CI failures in Trezor tests.

Top commit has no ACKs.

Tree-SHA512: 508c6c9cdbc18833360a146296293500480938723843927e980e124ab24cb17f035418623e7fcb3e1a196e3e6bb7754bdd3bd2903d5d9064918ad875124efd1a
  • Loading branch information
achow101 committed Jan 12, 2023
2 parents 14f5134 + b8a379c commit 60226d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions hwilib/devices/trezor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
DeviceConnectionError,
DEVICE_NOT_INITIALIZED,
DeviceNotReadyError,
NoPasswordError,
UnavailableActionError,
common_err_msgs,
handle_errors,
Expand Down
4 changes: 2 additions & 2 deletions test/test_trezor.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def test_passphrase(self):
result = self.do_command(self.dev_args + ['enumerate'])
for dev in result:
if dev['type'] == 'trezor' and dev['path'] == 'udp:127.0.0.1:21324':
self.assertTrue(dev['needs_passphrase_sent'])
self.assertIn("warnings", dev)
break
else:
self.fail("Did not enumerate device")
Expand All @@ -352,7 +352,7 @@ def test_passphrase(self):
break
else:
self.fail("Did not enumerate device")
result = self.do_command(self.dev_args + ['-p', '', 'enumerate'])
result = self.do_command(self.dev_args + ['-p', '\"\"', 'enumerate'])
for dev in result:
if dev['type'] == 'trezor' and dev['path'] == 'udp:127.0.0.1:21324':
self.assertFalse(dev['needs_passphrase_sent'])
Expand Down

0 comments on commit 60226d0

Please sign in to comment.