Skip to content

test_empty_authorization_list()

Documentation for tests/prague/eip7702_set_code_tx/test_invalid_tx.py::test_empty_authorization_list@20373115.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/prague/eip7702_set_code_tx/test_invalid_tx.py::test_empty_authorization_list --fork Amsterdam

Test sending a transaction with an empty authorization list.

Source code in tests/prague/eip7702_set_code_tx/test_invalid_tx.py
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
def test_empty_authorization_list(
    transaction_test: TransactionTestFiller,
    pre: Alloc,
) -> None:
    """Test sending a transaction with an empty authorization list."""
    tx = Transaction(
        gas_limit=100_000,
        to=0,
        value=0,
        authorization_list=[],
        error=TransactionException.TYPE_4_EMPTY_AUTHORIZATION_LIST,
        sender=pre.fund_eoa(),
    )
    transaction_test(
        pre=pre,
        tx=tx,
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 3 forks.