Closed matejcik closed 5 years ago
Example usage is in test_msg_resetdevice_t2.py
So, in a test I define a callable function (input_flow
in this example) where I specify the confirms/interactions with trezor using yield
and the debug link and I then give this callback to self.client.set_input_flow
and run the test. Correct?
LGTM
rebased & merged
This implements #307 by moving the UI interaction into a separate module, separated by an actual API.
This change also lets me separate
TrezorClientDebugLink
better and add some useful features for the test suite, namely, input flow support.In a test, you can write a function that
yield
s to wait for interaction, and then performs the interaction. This is in contrast to the current behavior, where if you want to do anything more complicated than auto-clicking "yes" on every prompt, you need to write send/receive messages by hand, instead of using library functions.Example usage is in test_msg_resetdevice_t2.py
In addition, reporting for un/expected messages is nicer.
This is work in progress, please do not merge