Skip to content

Commit 32861f0

Browse files
committed
fix: some precheck strings
1 parent e276135 commit 32861f0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/integration/token_pause_transaction_e2e_test.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ 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),
65+
(TokenId(0, 0, 99999999), PrecheckError, str(ResponseCode.INVALID_TOKEN_ID)),
6666
# (lazy_fixture("unpausable_token"), PrecheckError, ResponseCode.TOKEN_HAS_NO_PAUSE_KEY),
6767
],
6868
)
@@ -77,9 +77,13 @@ def test_pause_error_cases(env, token_id, exception, msg):
7777
if token_id is not None:
7878
tx.set_token_id(token_id)
7979

80-
tx.freeze_with(env.client)
81-
with pytest.raises(exception, match=msg):
82-
tx.execute(env.client)
80+
if exception is ValueError:
81+
with pytest.raises(ValueError, match=msg):
82+
tx.freeze_with(env.client)
83+
else:
84+
tx.freeze_with(env.client)
85+
with pytest.raises(exception, match=msg):
86+
tx.execute(env.client)
8387

8488
@mark.integration
8589
class TestTokenPause:

0 commit comments

Comments
 (0)