def METHOD_NAME(db, default_namespace, api_client):
    add_fake_event(
        db.session,
        default_namespace.id,
        calendar=db.session.query(Calendar)
        .filter(
            Calendar.namespace_id == default_namespace.id, Calendar.read_only == true()
        )
        .first(),
        read_only=True,
    )
    calendar_list = api_client.get_data("/calendars")
    read_only_calendar = None
    for c in calendar_list:
        if c["read_only"]:
            read_only_calendar = c
            break
    events = api_client.get_data(
        "/events?calendar_id={}".format(read_only_calendar["id"])
    )
    for event in events:
        if event["read_only"]:
            read_only_event = event
            break
    assert read_only_calendar
    assert read_only_event
    e_id = read_only_event["id"]
    resp = api_client.delete(f"/events/{e_id}")
    assert resp.status_code == 400