Because of the strings attached to the NCLB, many schools will lose their federal funding if their students do poorly on the NCLB tests, which puts many teachers in a bind. If they like their jobs but know their students aren't prepared to meet the federal standard on the tests, they will sometimes resort to unethical means, like cheating, to make their students successful and so they can keep their job.
No, NCLB cannot avoid teacher cheating on tests, because the teachers have a reason to want to cheat. The teachers are evaluated based on how their students perform. They might lose their job or miss out on bonuses if their students do not do well, so they will find a way to cheat. Even with enforcement mechanisms and checks in place, a small percent of teachers will find a way to cheat.