def test_invalid_secret_and_key_type(self): with self.assertRaises(XRPLModelException): Sign( transaction=_TRANSACTION, secret=_SECRET, key_type="secp256k1", )
def test_invalid_secret_and_passphrase(self): with self.assertRaises(XRPLModelException): Sign( transaction=_TRANSACTION, secret=_SECRET, passphrase=_PASSPHRASE, )
def test_invalid_seed_hex_and_passphrase(self): with self.assertRaises(XRPLModelException): Sign( transaction=_TRANSACTION, seed_hex=_SEED_HEX, passphrase=_PASSPHRASE, )
def test_invalid_seed_and_seed_hex(self): with self.assertRaises(XRPLModelException): Sign( transaction=_TRANSACTION, seed=_SEED, seed_hex=_SEED_HEX, )
def test_valid_seed(self): request = Sign(transaction=_TRANSACTION, seed=_SEED, key_type=CryptoAlgorithm.SECP256K1) self.assertTrue(request.is_valid())
def test_valid_secret(self): request = Sign( transaction=_TRANSACTION, secret=_SECRET, ) self.assertTrue(request.is_valid())
def test_invalid_secret_and_seed(self): with self.assertRaises(XRPLModelException): Sign(transaction=_TRANSACTION, secret=_SECRET, seed=_SEED)