Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(12) | Call(12) | Derive(0) | Import(0)
src/p/y/python-trezor-HEAD/tests/test_msg_changepin.py python-trezor(Download)
# Check that there's PIN protection now features = self.client.call_raw(proto.Initialize()) self.assertTrue(features.pin_protection) ret = self.client.call_raw(proto.Ping(pin_protection=True)) self.assertIsInstance(ret, proto.PinMatrixRequest)
def test_change_pin(self): self.setup_mnemonic_pin_passphrase() features = self.client.call_raw(proto.Initialize()) self.assertTrue(features.pin_protection)
# Check that there's still PIN protection now features = self.client.call_raw(proto.Initialize()) self.assertTrue(features.pin_protection) ret = self.client.call_raw(proto.Ping(pin_protection=True)) self.assertIsInstance(ret, proto.PinMatrixRequest)
def test_remove_pin(self): self.setup_mnemonic_pin_passphrase() features = self.client.call_raw(proto.Initialize()) self.assertTrue(features.pin_protection)
def test_set_failed_2(self): self.setup_mnemonic_pin_passphrase() features = self.client.call_raw(proto.Initialize()) self.assertTrue(features.pin_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.assertTrue(resp.pin_protection) self.assertTrue(resp.passphrase_protection)
src/p/y/python-trezor-HEAD/tests/test_msg_recoverydevice.py python-trezor(Download)
self.assertEqual(self.client.debug.read_mnemonic(), self.mnemonic12) self.assertTrue(self.client.features.pin_protection) self.assertTrue(self.client.features.passphrase_protection)
src/p/y/python-trezor-HEAD/tests/test_basic.py python-trezor(Download)
# ID must be at least 12 characters self.assertTrue(len(id1) >= 12) # Every resulf of UUID must be the same
src/p/y/python-trezor-HEAD/tests/test_msg_getentropy.py python-trezor(Download)
self.client.set_expected_responses([proto.ButtonRequest(code=proto_types.ButtonRequest_ProtectCall), proto.Entropy()]) ent = self.client.get_entropy(l) self.assertTrue(len(ent) >= l) print 'entropy = ', entropy(ent)