Skip to content

Commit

Permalink
add wrong prefix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mvadari committed Jul 26, 2022
1 parent bdbff21 commit 1c78c10
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/unit/core/addresscodec/test_codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ def test_seed_decode_ed25519_different_prefix(self):
self.assertEqual(decode_result, hex_string_bytes)
self.assertEqual(encoding_type, CryptoAlgorithm.ED25519)

def test_seed_decode_secp256k1_wrong_prefix(self):
encoded_string = "sEdV19BLfeQeKdEXyYA4NhjPJe6XBfG"

self.assertRaises(
addresscodec.XRPLAddressCodecException,
addresscodec.decode_seed,
encoded_string,
CryptoAlgorithm.SECP256K1,
)

def test_seed_encode_decode_too_small(self):
hex_string = "CF2DE378FBDD7E2EE87D486DFB5A7B"
hex_string_bytes = bytes.fromhex(hex_string)
Expand Down

0 comments on commit 1c78c10

Please sign in to comment.