Possibly, though it is just as likely that the tests would still not catch the problem in a local dev environment if that module is not used there, right?
To avoid problems like that, you probably want your dev environment as close as possible to your production environment. You probably also want to be testing your production specific code/logic (especially if you're not doing that on your local).