Skip to content

Commit 1a8814c

Browse files
Update regex in transaction-fee-related tests (#1429)
* fix: Change regex in `test_transaction_not_received_max_fee_too_small` * fix: Change regex in `test_transaction_not_received_max_fee_too_big`
1 parent b7ddead commit 1a8814c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

starknet_py/tests/e2e/tests_on_networks/client_test.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ async def test_transaction_not_received_max_fee_too_small(account_sepolia_testne
9797
)
9898
sign_invoke = await account.sign_invoke_v1(calls=call, max_fee=int(1e10))
9999

100-
with pytest.raises(ClientError, match=r".*MaxFeeTooLow.*"):
100+
with pytest.raises(
101+
ClientError,
102+
match=r"Client failed with code 55. Message: Account validation failed. Data: Max fee \(\d+\) is too low. Minimum fee: \d+.",
103+
):
101104
await account.client.send_transaction(sign_invoke)
102105

103106

@@ -111,7 +114,10 @@ async def test_transaction_not_received_max_fee_too_big(account_sepolia_testnet)
111114
)
112115
sign_invoke = await account.sign_invoke_v1(calls=call, max_fee=sys.maxsize)
113116

114-
with pytest.raises(ClientError, match=r".*max_fee.*"):
117+
with pytest.raises(
118+
ClientError,
119+
match=r"Client failed with code 55. Message: Account validation failed. Data: Max fee \(\d+\) exceeds balance \(\d+\).",
120+
):
115121
await account.client.send_transaction(sign_invoke)
116122

117123

0 commit comments

Comments
 (0)