From 8a7c6ce34d6f82645daf240fc8e74a1dc2d3a4f7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 8 Jul 2020 16:14:13 +0200 Subject: [PATCH] tests: fix device_handler to be able to enter passphrase via clicks note: this is currently broken due to #922 --- tests/device_handler.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/device_handler.py b/tests/device_handler.py index f7788955a..a703c6813 100644 --- a/tests/device_handler.py +++ b/tests/device_handler.py @@ -1,5 +1,6 @@ from concurrent.futures import ThreadPoolExecutor +from trezorlib.client import PASSPHRASE_ON_DEVICE from trezorlib.transport import udp udp.SOCKET_TIMEOUT = 0.1 @@ -15,8 +16,11 @@ class NullUI: raise NotImplementedError("NullUI should not be used with T1") @staticmethod - def get_passphrase(): - raise NotImplementedError("NullUI should not be used with T1") + def get_passphrase(available_on_device=False): + if available_on_device: + return PASSPHRASE_ON_DEVICE + else: + raise NotImplementedError("NullUI should not be used with T1") class BackgroundDeviceHandler: