File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 2222def test_transaction_response_fields (transaction_id ):
2323 """asserting response is correctly populated"""
2424 resp = TransactionResponse ()
25+
26+ # Assert public attributes exist (PRIORITY 1: protect against breaking changes)
27+ assert hasattr (resp , 'transaction_id' ), "Missing public attribute: transaction_id"
28+ assert hasattr (resp , 'node_id' ), "Missing public attribute: node_id"
29+ assert hasattr (resp , 'hash' ), "Missing public attribute: hash"
30+ assert hasattr (resp , 'validate_status' ), "Missing public attribute: validate_status"
31+ assert hasattr (resp , 'transaction' ), "Missing public attribute: transaction"
32+
33+ # Assert default values
34+ assert resp .hash == bytes (), "Default hash should be empty bytes"
35+ assert resp .validate_status is False , "Default validate_status should be False"
36+ assert resp .transaction is None , "Default transaction should be None"
37+
2538 resp .transaction_id = transaction_id
2639 resp .node_id = AccountId (0 , 0 , 3 )
2740
You can’t perform that action at this time.
0 commit comments