Then that should be fixed, at least wrt. junior high. There's no reason to expect an English or French teacher to be proficient in Math, or vise versa.
But I also think that there should be specialized teachers for math long before high school. Teaching math (or whatever) is not just about knowing it, it is also about know how to teach it at this or that age. And I don't think general purpose teacher can be good in knowing how to teach all subjects.
I am perfectly fine with teachers who cant pass this test teaching subjects that are not math or physics (or chemistry I guess).
I am absolutely not fine with math teacher who passed this test and that is extend of it. Specifically, math teacher should know a lot more.
How would moderate math skills possibly help with that? You think every public school teacher should be run statistical sampling on a continual basis AND dynamically addressing them?