Skip to content

test_empty_authorization_list()

Documentation for tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_empty_authorization_list@e9958ed2.

Generate fixtures for these test cases for Osaka with:

fill -v tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_empty_authorization_list --fork Osaka

Test sending an invalid transaction with empty authorization list.

Source code in tests/prague/eip7702_set_code_tx/test_set_code_txs.py
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
@pytest.mark.exception_test
def test_empty_authorization_list(
    state_test: StateTestFiller,
    pre: Alloc,
) -> None:
    """Test sending an invalid transaction with empty authorization list."""
    tx = Transaction(
        gas_limit=100_000,
        to=pre.deploy_contract(code=b""),
        value=0,
        authorization_list=[],
        error=TransactionException.TYPE_4_EMPTY_AUTHORIZATION_LIST,
        sender=pre.fund_eoa(),
    )

    state_test(
        env=Environment(),
        pre=pre,
        tx=tx,
        post={},
    )

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated)
...fork_Prague-state_test
...fork_Prague-blockchain_test_from_state_test
...fork_Osaka-state_test
...fork_Osaka-blockchain_test_from_state_test