Skip to content

Commit 35aef35

Browse files
committed
test: enhance NodeAddress tests with additional coverage for proto conversion
Signed-off-by: MonaaEid <monaa_eid@hotmail.com>
1 parent d5e0e14 commit 35aef35

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/unit/node_address_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ def test_from_dict():
115115
# Create NodeAddress from dict
116116
node_address = NodeAddress._from_dict(node_dict)
117117

118+
# Protect against breaking changes - verify return type
119+
assert isinstance(node_address, NodeAddress)
120+
118121
assert node_address._public_key == "sample-public-key"
119122
assert node_address._account_id == AccountId.from_string("0.0.123")
120123
assert node_address._node_id == 1234
@@ -160,6 +163,9 @@ def test_from_proto():
160163

161164
node_address = NodeAddress._from_proto(node_address_proto)
162165

166+
# Protect against breaking changes - verify return type
167+
assert isinstance(node_address, NodeAddress)
168+
163169
assert node_address._public_key == "sample-public-key"
164170
assert node_address._account_id == AccountId(0, 0, 123)
165171
assert node_address._node_id == 1234

0 commit comments

Comments
 (0)