@@ -39,6 +39,23 @@ def pausable_token(env):
3939def unpausable_token (env ):
4040 return create_fungible_token (env )
4141
42+ @mark .integration
43+ def test_pause_transaction_precheck_vs_receipt_behavior ():
44+ env = IntegrationTestEnv ()
45+ try :
46+ tx = TokenPauseTransaction ().set_token_id (TokenId (0 , 0 , 99999999 ))
47+
48+ try :
49+ result = tx .execute (env .client )
50+ except ReceiptStatusError as e :
51+ pytest .skip (f"SDK raises ReceiptStatusError: { e } " )
52+ except PrecheckError as e :
53+ pytest .skip (f"SDK raises PrecheckError: { e } " )
54+ else :
55+ pytest .skip (f"SDK returns a receipt with status: { result .status } " )
56+ finally :
57+ env .close ()
58+
4259@mark .integration
4360def test_pause_missing_token_id_raises_value_error (env ):
4461 """
@@ -58,10 +75,12 @@ def test_pause_nonexistent_token_id_raises_precheck_error(env):
5875 fake = TokenId (0 , 0 , 99999999 )
5976 tx = TokenPauseTransaction ().set_token_id (fake )
6077
61- with pytest .raises (PrecheckError , match = ResponseCode .get_name (ResponseCode .INVALID_TOKEN_ID )):
78+ with pytest .raises (ReceiptStatusError , match = ResponseCode .get_name (ResponseCode .INVALID_TOKEN_ID )):
6279 # .execute() will auto‐freeze and auto‐sign with the operator key
6380 tx .execute (env .client ) # ← this is what runs the precheck
6481
82+
83+
6584@mark .integration
6685def test_pause_fails_for_unpausable_token (env , unpausable_token ):
6786 """
0 commit comments