-
Notifications
You must be signed in to change notification settings - Fork 91
feat(tokens): Add comprehensive integration tests for CustomFee base class (#584) #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tokens): Add comprehensive integration tests for CustomFee base class (#584) #709
Conversation
Signed-off-by: Raja Rathour <[email protected]>
Signed-off-by: Raja Rathour <[email protected]>
Signed-off-by: Raja Rathour <[email protected]>
…le structure Signed-off-by: Raja Rathour <[email protected]>
…eipt as suggested by SDK module Signed-off-by: Raja Rathour <[email protected]>
…top-level exceptions module Signed-off-by: Raja Rathour <[email protected]>
…d on SDK traceback hint Signed-off-by: Raja Rathour <[email protected]>
…ggested by SDK traceback Signed-off-by: Raja Rathour <[email protected]>
…ggested by SDK traceback Signed-off-by: Raja Rathour <[email protected]>
|
Hey @exploreriii ! Some tests are failing , can you please help me out? |
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First thing to solve is your imports!
Your imports pull in files to use in your test, but if you are importing from non existent or wrong places, it will fail straight away
ImportError: cannot import name 'TransactionReceipt' from 'hiero_sdk_python.exceptions' (/home/runner/work/hiero-sdk-python/hiero-sdk-python/src/hiero_sdk_python/exceptions.py). Did you mean: 'TransactionRecord'?
Notice - error in the imports.
My recommendation is to use the search bar in VS code for other test files that are looking for TransactionReceipt and see where they imported it from.
Additionally yout test:
test_custom_fee.py
is not in the naming scheme we are using for other integration tests
Have you looked at the other integration test examples?
…tch e2e convention (#584) Signed-off-by: Raja Rathour <[email protected]>
…tch e2e convention (#584) Signed-off-by: Raja Rathour <[email protected]>
…eipt, resolving collection errors Signed-off-by: Raja Rathour <[email protected]>
…eipt, resolving collection errors Signed-off-by: Raja Rathour <[email protected]>
…eipt, resolving collection errors Signed-off-by: Raja Rathour <[email protected]>
|
Hi @exploreriii , I’ve fixed the imports and renamed the test to match the integration naming convention, but I’m still getting: Seems like TransactionReceipt might’ve been removed or replaced (maybe with TransactionRecord?). Could you please confirm which one to use? Thanks! |
|
TransactionReceipt is not there its here you can find it by searching for class TransactionReceipt but i can't find where you are using it to say more |
…eipt, resolving collection errors Signed-off-by: Raja Rathour <[email protected]>
…FractionalFee arguments Signed-off-by: Raja Rathour <[email protected]>
|
Hi @exploreriii , I think it is ready for review, please check it. |
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -1,11 +0,0 @@ | |||
| OPERATOR_ID=<YOUR_OPERATOR_ID> #your account id, can be retrived from https://portal.hedera.com/dashboard | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't delete env.example please
|
issues persist, thanks |
|
hi @Raja-89 , are you still working on this issue? |
No, not now you can surely take upon this issue. |
|
Thank you for trying @Raja-89 and passing this issue on |








Description
This PR addresses issue #584 by introducing a new integration test file,
tests/integration/test_custom_fee.py, to verify the network-level functionality of the abstract base classCustomFee.Since
CustomFeeis abstract, these tests primarily ensure that its underlying logic (collector ID management, serialization, and validation) works correctly when instantiated via its concrete subclasses and executed against the Hedera network.Key Changes & Verification Points
test_custom_fee.pyto cover the following critical areas:fee_collector_account_idandall_collectors_are_exemptfields are correctly transmitted and retrieved viaTokenInfoQuery._from_proto): Confirms that the base class correctly handles deserialization by successfully reconstructing Fixed, Fractional, and Royalty fee objects (and the nested fallback fee) from the network response.TokenCreateTransactionthat uses a non-existentfee_collector_account_id, verifying the SDK's internal validation mechanism (related to_validate_checksums).tests/integration/utils_for_test.py(create_fungible_tokenandcreate_nft_token) to accept an optionalcustom_feeslist, simplifying future token creation tests that involve fee structures.Related Issue
Closes #584