async def test_process_event_simple(test_state):
    """Test processing an event.

    Args:
        test_state: A state.
    """
    assert test_state.num1 == 0

    event = Event(token="t", name="set_num1", payload={"value": 69})
    async for update in test_state._process(event):
        # The event should update the value.
        assert test_state.num1 == 69

        # The delta should contain the changes, including computed vars.
        assert update.delta == {
            TestState.get_full_name(): {"num1": 69, "sum": 72.14},
            GrandchildState3.get_full_name(): {"computed": ""},
        }
        assert update.events == []
Test processing an event.

    Args:
        test_state: A state.
    
tests/units/test_state.py