Skip to content

Commit 25272a2

Browse files
committed
fixed test for removing valueError.
Signed-off-by: Adityarya11 <arya050411@gmail.com>
1 parent d6e13f6 commit 25272a2

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

src/hiero_sdk_python/query/account_info_query.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def _make_request(self):
5959

6060
crypto_info_query = crypto_get_info_pb2.CryptoGetInfoQuery()
6161
crypto_info_query.header.CopyFrom(query_header)
62-
crypto_info_query.accountID.CopyFrom(self.account_id._to_proto())
62+
if self.account_id is not None:
63+
crypto_info_query.accountID.CopyFrom(self.account_id._to_proto())
6364

6465
query = query_pb2.Query()
6566
query.cryptoGetInfo.CopyFrom(crypto_info_query)

tests/unit/account_info_query_test.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ def test_constructor():
3434
assert query.account_id == account_id
3535

3636

37-
def test_execute_fails_with_missing_account_id(mock_client):
38-
"""Test request creation with missing Account ID."""
39-
query = AccountInfoQuery()
40-
41-
with pytest.raises(ValueError, match=r"Account ID must be set before making the request\."):
42-
query.execute(mock_client)
43-
44-
4537
def test_get_method():
4638
"""Test retrieving the gRPC method for the query."""
4739
query = AccountInfoQuery()

0 commit comments

Comments
 (0)