Skip to content

Commit 909e114

Browse files
committed
chore: some initial test setups
Signed-off-by: exploreriii <[email protected]>
1 parent 7da734c commit 909e114

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .token_create_transaction import TokenCreateTransaction
2+
from .token_pause_transaction import TokenPauseTransaction
3+
from .token_id import TokenId
4+
from .token_type import TokenType
5+
from .supply_type import SupplyType

tests/integration/token_pause_transaction_e2e_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import pytest
2-
from pytest import mark, fixture, lazy_fixture
2+
from pytest import mark, fixture
33

44
from hiero_sdk_python.crypto.private_key import PrivateKey
5-
from hiero_sdk_python.exceptions import PrecheckError, ReceiptStatusException
5+
from hiero_sdk_python.exceptions import PrecheckError, ReceiptStatusError
66
from hiero_sdk_python.response_code import ResponseCode
77

88
from hiero_sdk_python.tokens import (
@@ -62,8 +62,8 @@ def unpausable_token(env):
6262
"token_id, exception, msg",
6363
[
6464
(None, ValueError, "token_id must be set"),
65-
(TokenId(0, 0, 99999999), PrecheckError, ResponseCode.INVALID_TOKEN_ID.name),
66-
(lazy_fixture("unpausable_token"), PrecheckError, ResponseCode.TOKEN_HAS_NO_PAUSE_KEY.name),
65+
(TokenId(0, 0, 99999999), PrecheckError, ResponseCode.INVALID_TOKEN_ID),
66+
# (lazy_fixture("unpausable_token"), PrecheckError, ResponseCode.TOKEN_HAS_NO_PAUSE_KEY),
6767
],
6868
)
6969
def test_pause_error_cases(env, token_id, exception, msg):
@@ -118,12 +118,12 @@ def test_transfers_blocked_when_paused(self, env, account: Account, pausable_tok
118118
For example, an attempt to transfer tokens fails with TOKEN_IS_PAUSED.
119119
"""
120120
env.pause_token(pausable_token)
121-
with pytest.raises(ReceiptStatusException, match=ResponseCode.TOKEN_IS_PAUSED.name):
121+
with pytest.raises(ReceiptStatusError, match=ResponseCode.TOKEN_IS_PAUSED.name):
122122
env.associate_and_transfer(account.id, account.key, pausable_token, 1)
123123

124124
@mark.parametrize("bad_key, exc_cls, msg", [
125-
(None, ReceiptStatusException, ResponseCode.TOKEN_ALREADY_PAUSED.name),
126-
(PrivateKey.generate(), ReceiptStatusException, ResponseCode.SIG_MISMATCH.name),
125+
(None, ReceiptStatusError, ResponseCode.get_name(ResponseCode.TOKEN_HAS_NO_PAUSE_KEY)),
126+
(PrivateKey.generate(), ReceiptStatusError, ResponseCode.get_name(ResponseCode.INVALID_PAUSE_KEY)),
127127
])
128128
def test_double_pause_errors(self, env, pausable_token, bad_key, exc_cls, msg):
129129
env.pause_token(pausable_token)

tests/integration/utils_for_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from hiero_sdk_python.account.account_id import AccountId
77
from hiero_sdk_python.query.account_balance_query import CryptoGetAccountBalanceQuery
8-
from hiero_sdk_python.query.token_info_query import TokenInfoQuery
8+
# from hiero_sdk_python.query.token_info_query import TokenInfoQuery
99

1010
from hiero_sdk_python.client.client import Client
1111
from hiero_sdk_python.client.network import Network

0 commit comments

Comments
 (0)