Skip to content

Commit 3f5d0de

Browse files
committed
fix(token): Update TokenInfoQuery to handle missing token_id and adjust pauseStatus type in response models
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
1 parent c9b8013 commit 3f5d0de

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

tests/unit/token_info_query_test.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ def test_constructor(token_id):
2929

3030

3131
# This test uses fixture mock_client as parameter
32-
def test_execute_fails_with_missing_token_id(mock_client):
33-
"""Test request creation with missing Token ID."""
32+
def test_make_request_without_token_id():
33+
"""Test that a request can be built without a token ID (network will reject it)."""
3434
query = TokenInfoQuery()
35-
36-
with pytest.raises(ValueError, match="Token ID must be set before making the request."):
37-
query.execute(mock_client)
35+
request = query._make_request()
36+
# Should build a valid query proto without a token ID set
37+
assert request.HasField("tokenGetInfo")
38+
assert not request.tokenGetInfo.HasField("token")
3839

3940

4041
def test_get_method():

0 commit comments

Comments
 (0)