Skip to content

Commit d2c2e22

Browse files
committed
fix: update transfer tests
Signed-off-by: prajeeta pal <[email protected]>
1 parent 1a00f7f commit d2c2e22

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
88

99
### Added
1010

11-
- Added Hbar object support for TransferTransaction HBAR transfers: methods now accept Union[int, Hbar] for amount parameters, with immediate normalization to tinybars- includes comprehensive unit tests covering various Hbar units (HBAR, MICROBAR, NANOBAR, TINYBAR) and accumulation behavior with mixed int and Hbar inputs.
11+
- Added Hbar object support for TransferTransaction HBAR transfers: methods now accept Union[int, Hbar] for amount parameters, with immediate normalization to tinybars- includes comprehensive and improved unit tests covering various Hbar units (HBAR, MICROBAR, NANOBAR, TINYBAR) and accumulation behavior with mixed int and Hbar inputs.
1212
- Added a module-level docstring to the HBAR allowance approval example to clarify
1313
delegated spending behavior and key concepts. [#1202](https://github.com/hiero-ledger/hiero-sdk-python/issues/1202)
1414
- Added a GitHub Actions workflow to validate broken Markdown links in pull requests.

tests/unit/transfer_transaction_test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,10 @@ def test_token_transfer_with_expected_decimals_building(mock_account_ids):
639639
account_id_1, account_id_2, node_account_id, token_id_1, _ = mock_account_ids
640640
transfer_tx = TransferTransaction()
641641

642-
transfer_tx.add_token_transfer_with_decimals(token_id_1, account_id_1, -100, 8)
643-
transfer_tx.add_token_transfer_with_decimals(token_id_1, account_id_2, 100, 8)
642+
transfer_tx.add_token_transfer_with_decimals(
643+
token_id_1, account_id_1, -100, 8)
644+
transfer_tx.add_token_transfer_with_decimals(
645+
token_id_1, account_id_2, 100, 8)
644646
transfer_tx.node_account_id = node_account_id
645647
transfer_tx.operator_account_id = account_id_1
646648

@@ -875,7 +877,8 @@ def test_multiple_nft_transfers_all_fields(mock_account_ids):
875877
nft_transfers = reconstructed.nft_transfers[token_id_1]
876878
assert len(nft_transfers) == 3
877879

878-
serial_to_approval = {nft.serial_number: nft.is_approved for nft in nft_transfers}
880+
serial_to_approval = {
881+
nft.serial_number: nft.is_approved for nft in nft_transfers}
879882
assert serial_to_approval[100] is True
880883
assert serial_to_approval[101] is False
881884
assert serial_to_approval[102] is True

0 commit comments

Comments
 (0)