|
|
|
@ -15,10 +15,9 @@
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
|
|
|
|
|
from .common import *
|
|
|
|
|
from .common import TrezorTest
|
|
|
|
|
from trezorlib import messages as proto
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -34,6 +33,11 @@ class TestMsgRecoverydevice(TrezorTest):
|
|
|
|
|
language='english',
|
|
|
|
|
enforce_wordlist=True))
|
|
|
|
|
|
|
|
|
|
# click through confirmation
|
|
|
|
|
assert isinstance(ret, proto.ButtonRequest)
|
|
|
|
|
self.client.debug.press_yes()
|
|
|
|
|
ret = self.client.call_raw(proto.ButtonAck())
|
|
|
|
|
|
|
|
|
|
assert isinstance(ret, proto.PinMatrixRequest)
|
|
|
|
|
|
|
|
|
|
# Enter PIN for first time
|
|
|
|
@ -92,6 +96,11 @@ class TestMsgRecoverydevice(TrezorTest):
|
|
|
|
|
language='english',
|
|
|
|
|
enforce_wordlist=True))
|
|
|
|
|
|
|
|
|
|
# click through confirmation
|
|
|
|
|
assert isinstance(ret, proto.ButtonRequest)
|
|
|
|
|
self.client.debug.press_yes()
|
|
|
|
|
ret = self.client.call_raw(proto.ButtonAck())
|
|
|
|
|
|
|
|
|
|
fakes = 0
|
|
|
|
|
for _ in range(int(12 * 2)):
|
|
|
|
|
assert isinstance(ret, proto.WordRequest)
|
|
|
|
@ -136,6 +145,11 @@ class TestMsgRecoverydevice(TrezorTest):
|
|
|
|
|
language='english',
|
|
|
|
|
enforce_wordlist=True))
|
|
|
|
|
|
|
|
|
|
# click through confirmation
|
|
|
|
|
assert isinstance(ret, proto.ButtonRequest)
|
|
|
|
|
self.client.debug.press_yes()
|
|
|
|
|
ret = self.client.call_raw(proto.ButtonAck())
|
|
|
|
|
|
|
|
|
|
assert isinstance(ret, proto.WordRequest)
|
|
|
|
|
for _ in range(int(12 * 2)):
|
|
|
|
|
(word, pos) = self.client.debug.read_recovery_word()
|
|
|
|
@ -154,6 +168,11 @@ class TestMsgRecoverydevice(TrezorTest):
|
|
|
|
|
language='english',
|
|
|
|
|
enforce_wordlist=True))
|
|
|
|
|
|
|
|
|
|
# click through confirmation
|
|
|
|
|
assert isinstance(ret, proto.ButtonRequest)
|
|
|
|
|
self.client.debug.press_yes()
|
|
|
|
|
ret = self.client.call_raw(proto.ButtonAck())
|
|
|
|
|
|
|
|
|
|
assert isinstance(ret, proto.PinMatrixRequest)
|
|
|
|
|
|
|
|
|
|
# Enter PIN for first time
|
|
|
|
|