def test_add_peer_with_invalid_key_size(self): for k in [ '9' * 13, '9' * (len(self.keys.publicKey().blob()) - 1), '9' * (len(self.keys.publicKey().blob()) + 1), '' ]: with self.assertRaises(ValueError): self.generate_base().addPeer("123.123.123.123", iroha.PublicKey(k)).build()
def test_create_account_invalid_key(self): for key in INVALID_KEYS: with self.assertRaises(ValueError): self.base().createAccount("admin", "test", iroha.PublicKey(key)).build()
def test_remove_signatory_invalid_key(self): for key in INVALID_KEYS: with self.assertRaises(ValueError): self.base().removeSignatory("admin@test", iroha.PublicKey(key)).build()
def test_add_peer_with_invalid_key_size(self): for k in INVALID_KEYS: with self.assertRaises(ValueError): self.base().addPeer("123.123.123.123", iroha.PublicKey(k)).build()