Made the deploy_auto_plan session stuff somewhat testable and created a test for it with the functionality provided by deploy_adhoc_plan