Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(8) | Call(8) | Derive(0) | Import(0)
src/p/y/python-trezor-HEAD/tests/test_msg_changepin.py python-trezor(Download)
def test_set_pin(self): self.setup_mnemonic_nopin_nopassphrase() features = self.client.call_raw(proto.Initialize()) self.assertFalse(features.pin_protection)
# Check that there's no PIN protection now features = self.client.call_raw(proto.Initialize()) self.assertFalse(features.pin_protection) ret = self.client.call_raw(proto.Ping(pin_protection=True)) self.assertIsInstance(ret, proto.Success) def test_set_failed(self): self.setup_mnemonic_nopin_nopassphrase() features = self.client.call_raw(proto.Initialize()) self.assertFalse(features.pin_protection)
# Check that there's still no PIN protection now features = self.client.call_raw(proto.Initialize()) self.assertFalse(features.pin_protection) ret = self.client.call_raw(proto.Ping(pin_protection=True)) self.assertIsInstance(ret, proto.Success)
src/p/y/python-trezor-HEAD/tests/test_msg_recoverydevice.py python-trezor(Download)
self.assertEqual(self.client.debug.read_mnemonic(), self.mnemonic12) self.assertFalse(self.client.features.pin_protection) self.assertFalse(self.client.features.passphrase_protection)
src/p/y/python-trezor-HEAD/tests/test_msg_resetdevice.py python-trezor(Download)
# Check if device is properly initialized resp = self.client.call_raw(proto.Initialize()) self.assertFalse(resp.pin_protection) self.assertFalse(resp.passphrase_protection)