From 21f3481c612d13b7dbf4dd4ba4dff5b24658dce6 Mon Sep 17 00:00:00 2001 From: slush0 Date: Fri, 7 Mar 2014 22:50:35 +0100 Subject: [PATCH] Removed button presses for LoadDevice/ResetDevice/RecoveryDevice --- tests/test_msg_recoverydevice.py | 19 ------------------- tests/test_protection_levels.py | 9 +++------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/tests/test_msg_recoverydevice.py b/tests/test_msg_recoverydevice.py index 2125e9dea9..47dbf23aae 100644 --- a/tests/test_msg_recoverydevice.py +++ b/tests/test_msg_recoverydevice.py @@ -13,11 +13,6 @@ class TestDeviceRecovery(common.TrezorTest): language='english', enforce_wordlist=True)) - - self.assertIsInstance(ret, proto.ButtonRequest) - self.client.debug.press_yes() - ret = self.client.call_raw(proto.ButtonAck()) - self.assertIsInstance(ret, proto.PinMatrixRequest) # Enter PIN for first time @@ -76,11 +71,6 @@ class TestDeviceRecovery(common.TrezorTest): language='english', enforce_wordlist=True)) - - self.assertIsInstance(ret, proto.ButtonRequest) - self.client.debug.press_yes() - ret = self.client.call_raw(proto.ButtonAck()) - fakes = 0 for _ in range(int(12 * 1.5)): self.assertIsInstance(ret, proto.WordRequest) @@ -125,10 +115,6 @@ class TestDeviceRecovery(common.TrezorTest): language='english', enforce_wordlist=True)) - self.assertIsInstance(ret, proto.ButtonRequest) - self.client.debug.press_yes() - ret = self.client.call_raw(proto.ButtonAck()) - self.assertIsInstance(ret, proto.WordRequest) for _ in range(int(12 * 1.5)): (word, pos) = self.client.debug.read_recovery_word() @@ -147,11 +133,6 @@ class TestDeviceRecovery(common.TrezorTest): language='english', enforce_wordlist=True)) - - self.assertIsInstance(ret, proto.ButtonRequest) - self.client.debug.press_yes() - ret = self.client.call_raw(proto.ButtonAck()) - self.assertIsInstance(ret, proto.PinMatrixRequest) # Enter PIN for first time diff --git a/tests/test_protection_levels.py b/tests/test_protection_levels.py index bcf9b3266d..a8fa9a56e5 100644 --- a/tests/test_protection_levels.py +++ b/tests/test_protection_levels.py @@ -75,8 +75,7 @@ class TestProtectionLevels(common.TrezorTest): def test_load_device(self): with self.client: - self.client.set_expected_responses([proto.ButtonRequest(), - proto.Success(), + self.client.set_expected_responses([proto.Success(), proto.Features()]) self.client.load_device_by_mnemonic('this is mnemonic', '1234', True, 'label', 'english', skip_checksum=True) @@ -86,8 +85,7 @@ class TestProtectionLevels(common.TrezorTest): def test_reset_device(self): with self.client: - self.client.set_expected_responses([proto.ButtonRequest(), - proto.EntropyRequest()] +\ + self.client.set_expected_responses([proto.EntropyRequest()] + \ [proto.ButtonRequest()] * 24 + \ [proto.Success(), proto.Features()]) @@ -99,8 +97,7 @@ class TestProtectionLevels(common.TrezorTest): def test_recovery_device(self): with self.client: self.client.set_mnemonic(self.mnemonic12) - self.client.set_expected_responses([proto.ButtonRequest(), ] + \ - [proto.WordRequest()] * int(12 * 1.5) + \ + self.client.set_expected_responses([proto.WordRequest()] * int(12 * 1.5) + \ [proto.Success(), proto.Features()]) self.client.recovery_device(12, False, False, 'label', 'english')