def METHOD_NAME(
    user_factory, post_factory, context_factory
):
    post = post_factory()
    db.session.add(post)
    db.session.commit()
    with pytest.raises(errors.AuthError):
        api.post_api.set_post_score(
            context_factory(
                params={"score": 1},
                user=user_factory(rank=model.User.RANK_ANONYMOUS),
            ),
            {"post_id": post.post_id},
        )