def test_owner_cannot_promote_member_to_superuser_via_collection(
    user_owned_collection,
    normal_user_client: R2RClient,
    another_normal_user_client: R2RClient,
):
    """Ensures that being a collection owner doesn't confer the right to
    promote a user to superuser."""
    # Add another user to the collection
    another_user_id = another_normal_user_client.users.me().results.id
    normal_user_client.collections.add_user(user_owned_collection,
                                            another_user_id)

    # Try to update the member's superuser status
    with pytest.raises(R2RException) as exc_info:
        normal_user_client.users.update(another_user_id, is_superuser=True)
    assert exc_info.value.status_code == 403, (
        "Collection owners should not grant superuser status.")
Ensures that being a collection owner doesn't confer the right to
    promote a user to superuser.
py/tests/integration/test_collections_users_interaction.py