def METHOD_NAME(app, db, session, client, test_request_context):
    db.create_all()
    items = [
        Voc(label="First", position=0),
        Voc(label="Second", position=2),
        Voc(label="Third", position=3),
    ]
    for i in items:
        session.add(i)
    session.commit()
    first, second, third = items
    url = url_for("admin.vocabularies")
    base_data = {"Model": Voc.Meta.name}
    data = {"down": first.id}
    data.update(base_data)
    r = client.post(url, data=data)
    assert r.status_code == 302
    assert path_from_url(r.location) == "/admin/vocabularies"
    assert Voc.query.order_by(Voc.position).all() == [second, first, third]
    data = {"up": first.id, "return_to": "group"}
    data.update(base_data)
    r = client.post(url, data=data)
    assert r.status_code == 302
    assert path_from_url(r.location) == "/admin/vocabularies/_/"
    assert Voc.query.order_by(Voc.position).all() == [first, second, third]
    data = {"up": first.id, "return_to": "model"}
    data.update(base_data)
    r = client.post(url, data=data)
    assert r.status_code == 302
    assert path_from_url(r.location) == "/admin/vocabularies/_/defaultstates/"
    assert Voc.query.order_by(Voc.position).all() == [first, second, third]
    data = {"down": third.id}
    data.update(base_data)
    r = client.post(url, data=data)
    assert r.status_code == 302
    assert path_from_url(r.location) == "/admin/vocabularies"
    assert Voc.query.order_by(Voc.position).all() == [first, second, third]
    data = {"up": third.id}
    data.update(base_data)
    r = client.post(url, data=data)
    assert r.status_code == 302
    assert path_from_url(r.location) == "/admin/vocabularies"
    assert Voc.query.order_by(Voc.position).all() == [first, third, second]