Remove unnecessary modules in test classes