async def test_dynamic_var_event(test_state: type[ATestState], token: str):
    """Test that the default handler of a dynamic generated var
    works as expected.

    Args:
        test_state: State Fixture.
        token: a Token.
    """
    state = test_state()  # pyright: ignore [reportCallIssue]
    state.add_var("int_val", int, 0)
    async for result in state._process(
        Event(
            token=token,
            name=f"{test_state.get_name()}.set_int_val",
            router_data={"pathname": "/", "query": {}},
            payload={"value": 50},
        )
    ):
        assert result.delta == {test_state.get_name(): {"int_val": 50}}
Test that the default handler of a dynamic generated var
    works as expected.

    Args:
        test_state: State Fixture.
        token: a Token.
    
tests/units/test_app.py