def METHOD_NAME(
    graphql_client, user, simple_schedule_item, mocker, schedule_item_attendee_factory
):
    mocker.patch("api.schedule.mutations.user_has_admission_ticket", return_value=True)
    graphql_client.force_login(user)
    schedule_item = simple_schedule_item
    schedule_item.attendees_total_capacity = None
    schedule_item.save()
    response = graphql_client.query(
        """mutation($id: ID!) {
        bookScheduleItem(id: $id) {
            __typename
        }
    }""",
        variables={"id": schedule_item.id},
    )
    assert (
        response["data"]["bookScheduleItem"]["__typename"] == "ScheduleItemNotBookable"
    )
    assert not ScheduleItemAttendee.objects.filter(
        schedule_item=schedule_item, user_id=user.id
    ).exists()