Skip to content

Commit c75388a

Browse files
committed
chore: clearer double pause
1 parent d6f815d commit c75388a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/integration/token_pause_transaction_e2e_test.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ def test_transfers_blocked_when_paused(self, env, account: Account, pausable_tok
125125
with pytest.raises(ReceiptStatusError, match=ResponseCode.TOKEN_IS_PAUSED.name):
126126
env.associate_and_transfer(account.id, account.key, pausable_token, 1)
127127

128-
@mark.parametrize("bad_key, exc_cls, msg", [
129-
(None, ReceiptStatusError, ResponseCode.get_name(ResponseCode.TOKEN_HAS_NO_PAUSE_KEY)),
130-
(PrivateKey.generate(), ReceiptStatusError, ResponseCode.get_name(ResponseCode.INVALID_PAUSE_KEY)),
131-
])
132-
def test_double_pause_errors(self, env, pausable_token, bad_key, exc_cls, msg):
133-
env.pause_token(pausable_token)
134-
with pytest.raises(exc_cls, match=msg):
135-
env.pause_token(pausable_token, key=bad_key)
128+
@mark.parametrize("bad_key, code", [
129+
(None, ResponseCode.TOKEN_HAS_NO_PAUSE_KEY),
130+
(PrivateKey.generate(), ResponseCode.INVALID_PAUSE_KEY),
131+
])
132+
def test_double_pause_errors(self, env, pausable_token, bad_key, code):
133+
env.pause_token(pausable_token)
134+
with pytest.raises(ReceiptStatusError, match=ResponseCode.get_name(code.value)):
135+
env.pause_token(pausable_token, key=bad_key)

0 commit comments

Comments
 (0)