async def test_async_computed_var_get_var_value(mock_app: rx.App, token: str):
    """A test where an async computed var depends on a var in another state.

    Args:
        mock_app: An app that will be returned by `get_app()`
        token: A token.
    """

    class OtherState(rx.State):
        """A state with a var."""

        data: list[dict[str, Any]] = [{"foo": "bar"}]

    mock_app.state_manager.state = mock_app._state = rx.State
    comp = Table.create(data=OtherState.data)
    state = await mock_app.state_manager.get_state(_substate_key(token, OtherState))
    other_state = await state.get_state(OtherState)
    assert comp.State is not None
    comp_state = await state.get_state(comp.State)
    assert comp_state.dirty_vars == set()

    other_state.data.append({"foo": "baz"})
    assert "data" in comp_state.dirty_vars
    assert "foo" in comp_state.dirty_vars
A test where an async computed var depends on a var in another state.

    Args:
        mock_app: An app that will be returned by `get_app()`
        token: A token.
    
tests/units/test_state.py