Who's they? Anyway, it's not a metaphor because this is a literal meaning of the word "test". "Idiomatic", describing a phase, means that it is customary in a language or otherwise that it sounds right to a native speaker. Such a phrase sounds better to a native ear as compared with another phase that is equally correct and technically means the same thing but instead sounds awkward to a native ear. An idiomatic expression can also mean, especially, a set phase that is well known and often used despite actually breaking the normal rules of the language, in which case it is better to be idiomatic than to be correct.
"A real test of character" is idiomatic in that it's something we hear enough so that it sounds commonplace. However, it is not an expression that breaks any typical rules of grammar, and it's not a metaphor in any sense because the words are being used according to their literal meanings.