Skip to content

Commit e31988a

Browse files
committed
refactor: move env fixture to utils
Signed-off-by: exploreriii <[email protected]>
1 parent 4ef66b2 commit e31988a

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

tests/integration/token_pause_transaction_e2e_test.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,14 @@
99
TokenId
1010
)
1111

12-
from tests.integration.utils_for_test import IntegrationTestEnv, create_fungible_token, Account
12+
from tests.integration.utils_for_test import env, IntegrationTestEnv, create_fungible_token, Account
1313
from hiero_sdk_python.transaction.transfer_transaction import TransferTransaction
1414
from hiero_sdk_python.tokens.token_associate_transaction import TokenAssociateTransaction
1515
from hiero_sdk_python.query.account_balance_query import CryptoGetAccountBalanceQuery
1616
from hiero_sdk_python.query.token_info_query import TokenInfoQuery
1717

1818
pause_key = PrivateKey.generate()
1919

20-
@fixture
21-
def env():
22-
"""Integration test environment with client/operator set up."""
23-
e = IntegrationTestEnv()
24-
yield e
25-
e.close()
26-
2720
@fixture
2821
def account(env):
2922
"""A fresh account funded with 1 HBAR balance."""

tests/integration/utils_for_test.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import os
2+
from pytest import fixture
23

34
from dotenv import load_dotenv
45
from dataclasses import dataclass
56

67
from hiero_sdk_python.account.account_id import AccountId
7-
from hiero_sdk_python.query.account_balance_query import CryptoGetAccountBalanceQuery
8-
from hiero_sdk_python.query.token_info_query import TokenInfoQuery
98

109
from hiero_sdk_python.client.client import Client
1110
from hiero_sdk_python.client.network import Network
@@ -16,13 +15,19 @@
1615
from hiero_sdk_python.tokens.supply_type import SupplyType
1716
from hiero_sdk_python.tokens.token_create_transaction import TokenCreateTransaction, TokenKeys, TokenParams
1817
from hiero_sdk_python.tokens.token_associate_transaction import TokenAssociateTransaction
19-
from hiero_sdk_python.tokens.token_pause_transaction import TokenPauseTransaction
2018
from hiero_sdk_python.account.account_create_transaction import AccountCreateTransaction
2119
from hiero_sdk_python.transaction.transfer_transaction import TransferTransaction
2220
from hiero_sdk_python.hbar import Hbar
2321

2422
load_dotenv(override=True)
2523

24+
@fixture
25+
def env():
26+
"""Integration test environment with client/operator set up."""
27+
e = IntegrationTestEnv()
28+
yield e
29+
e.close()
30+
2631
@dataclass
2732
class Account:
2833
id: AccountId

0 commit comments

Comments
 (0)