async def test_preprocess_no_events(hydrate_middleware, event1, mocker: MockerFixture):
    """Test that app without on_load is processed correctly.

    Args:
        hydrate_middleware: Instance of HydrateMiddleware
        event1: An Event.
        mocker: pytest mock object.
    """
    mocker.patch("reflex.state.State.class_subclasses", {TestState})
    state = State()
    update = await hydrate_middleware.preprocess(
        app=App(_state=State),
        event=event1,
        state=state,
    )
    assert isinstance(update, StateUpdate)
    assert update.delta == state.dict()
    assert not update.events
Test that app without on_load is processed correctly.

    Args:
        hydrate_middleware: Instance of HydrateMiddleware
        event1: An Event.
        mocker: pytest mock object.
    
tests/units/middleware/test_hydrate_middleware.py