Skip to content

Commit 4ef66b2

Browse files
committed
fix: naming from_proto not yet private
Signed-off-by: exploreriii <[email protected]>
1 parent c2c9bdb commit 4ef66b2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/hiero_sdk_python/tokens/token_pause_transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _get_method(self, channel: _Channel) -> _Method:
6767
query_func=None
6868
)
6969

70-
def _from_proto(self, proto: TokenPauseTransactionBody):
70+
def from_proto(self, proto: TokenPauseTransactionBody):
7171
"""
7272
Deserializes a TokenPauseTransactionBody from a protobuf object.
7373

tests/unit/test_token_pause_transaction.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ def test_to_proto(token_id, mock_client):
7777
assert proto.signedTransactionBytes
7878
assert len(proto.signedTransactionBytes) > 0
7979

80-
def test__from_proto_restores_token_id():
80+
def test_from_proto_restores_token_id():
8181
"""
82-
_from_proto() must deserialize TokenPauseTransactionBody → .token_id correctly.
82+
from_proto() must deserialize TokenPauseTransactionBody → .token_id correctly.
8383
"""
8484
# Construct a TokenPauseTransactionBody protobuf for an example token id.
8585
proto_body = TokenPauseTransactionBody(token=TokenId(7, 8, 9).to_proto())
8686

87-
# Use _from_proto to build a TokenPauseTransaction whose token_id comes from the protobuf just created.
88-
tx = TokenPauseTransaction()._from_proto(proto_body)
87+
# Use from_proto to build a TokenPauseTransaction whose token_id comes from the protobuf just created.
88+
tx = TokenPauseTransaction().from_proto(proto_body)
8989

9090
# Verify that tx.token_id matches TokenId(7, 8, 9)
9191
assert tx.token_id == TokenId(7, 8, 9)

0 commit comments

Comments
 (0)