diff --git a/tests/functional/geth/test_provider.py b/tests/functional/geth/test_provider.py index 27f2a7043d..57cb676451 100644 --- a/tests/functional/geth/test_provider.py +++ b/tests/functional/geth/test_provider.py @@ -707,12 +707,21 @@ def test_estimate_gas_cost_of_static_fee_txn(geth_contract, geth_provider, geth_ @geth_process_test -def test_estimate_gas_cost_reverts(geth_contract, geth_provider, geth_second_account): +def test_estimate_gas_cost_reverts_with_message(geth_contract, geth_provider, geth_second_account): + # NOTE: The error message from not-owner is "!authorized". txn = geth_contract.setNumber.as_transaction(900, sender=geth_second_account, type=0) with pytest.raises(ContractLogicError): geth_provider.estimate_gas_cost(txn) +@geth_process_test +def test_estimate_gas_cost_reverts_no_message(geth_contract, geth_provider, geth_account): + # NOTE: The error message from using `5` has no revert message. + txn = geth_contract.setNumber.as_transaction(5, sender=geth_account, type=0) + with pytest.raises(ContractLogicError): + geth_provider.estimate_gas_cost(txn) + + @geth_process_test @pytest.mark.parametrize("tx_type", TransactionType) def test_prepare_transaction_with_max_gas(tx_type, geth_provider, ethereum, geth_account):