Skip to content

Commit 2b2fc79

Browse files
committed
chore: updated e2e test
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
1 parent cce16c4 commit 2b2fc79

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

src/hiero_sdk_python/query/fee_estimate_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def execute(self, client) -> FeeEstimateResponse:
137137
self._ensure_frozen(self._transaction, client)
138138

139139
if self._is_chunked():
140-
return self._execute_chunked(client, url, mode)
140+
return self._execute_chunked(url, mode)
141141

142142
return self._execute_single(url, mode)
143143

tests/integration/transaction_freeze_e2e_test.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ def test_transaction_executes_successfully(env):
2424
receipt = tx.execute(executor_client)
2525

2626
# Verify that the transaction_bodys are generated for all nodes present in client network
27-
assert len(tx._transaction_body_bytes) == len(env.client.network.nodes)
28-
assert set(tx._transaction_body_bytes.keys()) == {node._account_id for node in env.client.network.nodes}
27+
assert len(tx._transaction_body_bytes) == len(tx._transaction_ids)
28+
assert set(tx._transaction_body_bytes.keys()) == set(tx._transaction_ids)
29+
30+
# TODO: check for node_ids
2931

3032
assert receipt.status == ResponseCode.SUCCESS, "Transaction must execute successfully"
3133

@@ -43,8 +45,10 @@ def test_transaction_executes_successfully_with_node_account_ids(env):
4345
tx.sign(executor_key)
4446

4547
# Verify that the transaction_bodys are generated for the provided node_account_ids only
46-
assert len(tx._transaction_body_bytes) == 2
47-
assert set(tx._transaction_body_bytes.keys()) == set(node_account_ids)
48+
assert len(tx._transaction_body_bytes) == len(tx._transaction_ids)
49+
assert set(tx._transaction_body_bytes.keys()) == set(tx._transaction_ids)
50+
51+
# TODO: check for the node_ids
4852

4953
receipt = tx.execute(executor_client)
5054
assert receipt.status == ResponseCode.SUCCESS, "Transaction must execute successfully"
@@ -63,8 +67,10 @@ def test_transaction_executes_successfully_with_single_node_account_id(env):
6367
tx.sign(executor_key)
6468

6569
# Verify that the transaction_bodys are generated for the provided node_account_id only
66-
assert len(tx._transaction_body_bytes) == 1
67-
assert set(tx._transaction_body_bytes.keys()) == {node_account_id}
70+
assert len(tx._transaction_body_bytes) == len(tx._transaction_ids)
71+
assert set(tx._transaction_body_bytes.keys()) == set(tx._transaction_ids)
72+
73+
# TODO: check for node_ids
6874

6975
receipt = tx.execute(executor_client)
7076
assert receipt.status == ResponseCode.SUCCESS, "Transaction must execute successfully"

tests/unit/fee_estimate_query_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def test_port_replacement_for_localhost_execute_multiple():
380380
with patch.object(query, "_execute_chunked", return_value=MagicMock()) as mock_execute_chunked:
381381
query.execute(client_1)
382382

383-
called_url = mock_execute_chunked.call_args[0][1]
383+
called_url = mock_execute_chunked.call_args[0][0]
384384
assert ":8084" in called_url
385385
assert ":38081" not in called_url
386386

@@ -389,6 +389,6 @@ def test_port_replacement_for_localhost_execute_multiple():
389389

390390
with patch.object(query, "_execute_chunked", return_value=MagicMock()) as mock_execute_chunked:
391391
query.execute(client_2)
392-
called_url = mock_execute_chunked.call_args[0][1]
392+
called_url = mock_execute_chunked.call_args[0][0]
393393
assert ":8084" in called_url
394394
assert ":38081" not in called_url

0 commit comments

Comments
 (0)