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()
Exemple #2
0
 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()
Exemple #3
0
 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()
Exemple #4
0
 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()