nutty as a fruitcake
Crazy, idiotic, as in Mary's nutty as a fruitcake if she thinks she can get away with that. The adjective nutty meaning “insane” was first recorded in 1821; the similarity to fruitcake, which literally contains nuts as well as fruit, was first recorded in 1935.