-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Fix label tests #536
Conversation
b2ab5ae
to
a39a741
Compare
a39a741
to
6b043d3
Compare
result = self.do_command(self.dev_args + ['enumerate']) | ||
for dev in result: | ||
if dev['type'] == 'trezor' and dev['path'] == 'udp:127.0.0.1:11044': | ||
self.assertEqual(result['label'], 'HWI Keepkey') | ||
if dev['type'] == 'keepkey' and dev['path'] == 'udp:127.0.0.1:11044': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this stay as "trezor"?
Other occurences in this file use it like this:
Line 222 in 618158a
if dev['type'] == 'trezor' and dev['path'] == 'udp:127.0.0.1:11044': |
Line 231 in 618158a
if dev['type'] == 'trezor' and dev['path'] == 'udp:127.0.0.1:11044': |
Line 262 in 618158a
if dev['type'] == 'trezor' and dev['path'] == 'udp:127.0.0.1:11044': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, those are actually incorrect! I've added a commit that fixes them and will cause the tests to fail if these are incorrect.
There are a number of trezor and keepkey tests which rely on enumerate and then looking at the enumerated results. However some are looking for the wrong thing and inadverdently doing nothing. So extra checks are added to make sure they are actually doing something.
Merging as CI passed |
@@ -285,20 +297,30 @@ def test_passphrase(self): | |||
|
|||
# A passphrase will need to be sent | |||
result = self.do_command(self.dev_args + ['enumerate']) | |||
print(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to remove this debug line.
These tests weren't working. Also fixed another keepkey test bug.