def app_module_mock(monkeypatch) -> mock.Mock:
    """Mock the app module.

    This overwrites prerequisites.get_app to return the mock for the app module.

    To use this in your test, assign `app_module_mock.app = rx.App(...)`.

    Args:
        monkeypatch: pytest monkeypatch fixture.

    Returns:
        The mock for the main app module.
    """
    app_module_mock = mock.Mock()
    get_app_mock = mock.Mock(return_value=app_module_mock)
    monkeypatch.setattr(prerequisites, "get_app", get_app_mock)
    return app_module_mock
Mock the app module.

    This overwrites prerequisites.get_app to return the mock for the app module.

    To use this in your test, assign `app_module_mock.app = rx.App(...)`.

    Args:
        monkeypatch: pytest monkeypatch fixture.

    Returns:
        The mock for the main app module.
    
tests/units/conftest.py