1- # RENAME FILE TO: tests/unit/signature_deduplication_test.py
2-
31from __future__ import annotations
42
53from hiero_sdk_python .account .account_id import AccountId
@@ -14,6 +12,7 @@ def test_duplicate_signature_not_added():
1412 tx .set_transaction_id (TransactionId .generate (AccountId (0 , 0 , 1234 )))
1513 tx .set_node_account_id (AccountId (0 , 0 , 3 ))
1614 tx .set_token_id (TokenId (0 , 0 , 1 ))
15+ tx .set_amount (100 )
1716 key = PrivateKey .generate_ed25519 ()
1817 tx .freeze ()
1918 tx .sign (key )
@@ -28,6 +27,7 @@ def test_multiple_keys_still_work():
2827 tx .set_transaction_id (TransactionId .generate (AccountId (0 , 0 , 1234 )))
2928 tx .set_node_account_id (AccountId (0 , 0 , 3 ))
3029 tx .set_token_id (TokenId (0 , 0 , 1 ))
30+ tx .set_amount (100 )
3131 key1 = PrivateKey .generate_ed25519 ()
3232 key2 = PrivateKey .generate_ed25519 ()
3333 tx .freeze ()
@@ -38,7 +38,7 @@ def test_multiple_keys_still_work():
3838 assert len (sig_pairs ) == 2 , "Expected 2 signatures for different keys"
3939 pubkey_prefixes = {sp .pubKeyPrefix for sp in sig_pairs }
4040 expected_prefixes = {
41- key1 .public_key ().to_bytes (),
42- key2 .public_key ().to_bytes (),
41+ key1 .public_key ().to_bytes_raw (),
42+ key2 .public_key ().to_bytes_raw (),
4343 }
4444 assert pubkey_prefixes == expected_prefixes , "Signatures should match key1 and key2 exactly"
0 commit comments