Adding test=True ability to schedule module and state.
Lint fixes.
Merge pull request #13707 from garethgreenaway/schedule_module_test

Adding test=True ability to schedule module and state.