|
1 | 1 | import pytest |
2 | 2 |
|
3 | 3 | from hiero_sdk_python.account.account_create_transaction import AccountCreateTransaction |
| 4 | +from hiero_sdk_python.account.account_id import AccountId |
4 | 5 | from hiero_sdk_python.crypto.private_key import PrivateKey |
5 | 6 | from hiero_sdk_python.exceptions import ReceiptStatusError |
| 7 | +from hiero_sdk_python.file.file_append_transaction import FileAppendTransaction |
| 8 | +from hiero_sdk_python.file.file_create_transaction import FileCreateTransaction |
| 9 | +from hiero_sdk_python.file.file_id import FileId |
6 | 10 | from hiero_sdk_python.hapi.services import ( |
7 | 11 | basic_types_pb2, |
8 | 12 | response_header_pb2, |
|
11 | 15 | transaction_receipt_pb2, |
12 | 16 | transaction_response_pb2, |
13 | 17 | ) |
| 18 | +from hiero_sdk_python.hbar import Hbar |
14 | 19 | from hiero_sdk_python.response_code import ResponseCode |
| 20 | +from hiero_sdk_python.transaction.transaction_id import TransactionId |
15 | 21 | from hiero_sdk_python.transaction.transaction_receipt import TransactionReceipt |
16 | 22 | from hiero_sdk_python.transaction.transaction_response import TransactionResponse |
17 | 23 | from tests.unit.mock_server import mock_hedera_servers |
18 | 24 |
|
19 | 25 | pytestmark = pytest.mark.unit |
20 | 26 |
|
21 | 27 |
|
| 28 | +@pytest.fixture |
| 29 | +def file_id(): |
| 30 | + """Returns a file_is for test.""" |
| 31 | + return FileId.from_string("0.0.1") |
| 32 | + |
| 33 | + |
| 34 | +@pytest.fixture |
| 35 | +def account_id(): |
| 36 | + """Returns an account_id for test.""" |
| 37 | + return AccountId.from_string("0.0.9") |
| 38 | + |
| 39 | + |
| 40 | +@pytest.fixture |
| 41 | +def transaction_id(): |
| 42 | + """Returns a transaction_id for test.""" |
| 43 | + return TransactionId.from_string("0.0.9@1770911831.331000137") |
| 44 | + |
22 | 45 |
|
23 | 46 | def test_execute_waits_for_receipt_receipt(): |
24 | 47 | """Test execute return TransactionReceipt when wait_for_receipt is True (default).""" |
@@ -153,23 +176,6 @@ def test_execute_returns_receipt_without_error_when_validation_disabled(): |
153 | 176 | receipt = tx.execute(client) |
154 | 177 |
|
155 | 178 | assert receipt.status == ResponseCode.INVALID_SIGNATURE |
156 | | -@pytest.fixture |
157 | | -def file_id(): |
158 | | - """Returns a file_is for test.""" |
159 | | - return FileId.from_string("0.0.1") |
160 | | - |
161 | | - |
162 | | -@pytest.fixture |
163 | | -def account_id(): |
164 | | - """Returns an account_id for test.""" |
165 | | - return AccountId.from_string("0.0.9") |
166 | | - |
167 | | - |
168 | | -@pytest.fixture |
169 | | -def transaction_id(): |
170 | | - """Returns a transaction_id for test.""" |
171 | | - return TransactionId.from_string("0.0.9@1770911831.331000137") |
172 | | - |
173 | 179 |
|
174 | 180 | def test_same_size_for_identical_transactions(transaction_id, account_id): |
175 | 181 | """Test two identical transactions should have the same size.""" |
|
0 commit comments