def test_GIVEN_reapply_auto_default_WHEN_ioc_restarts_requested_THEN_ioc_control_may_return_before_restart_complete(self):
     ic = IocControl("", MockProcServWrapper())
     ic.start_ioc("TESTIOC")
     self.assertFalse(ic.ioc_restart_pending("TESTIOC"))
     ic.restart_iocs(["TESTIOC"])
     self.assertTrue(ic.ioc_restart_pending("TESTIOC"))
 def test_GIVEN_reapply_auto_true_WHEN_multiple_ioc_restarts_requested_THEN_ioc_control_waits_for_restart_complete(self):
     ic = IocControl("", MockProcServWrapper())
     ic.start_ioc("TESTIOC")
     self.assertFalse(ic.ioc_restart_pending("TESTIOC"))
     ic.restart_iocs(["TESTIOC"],reapply_auto=True)
     self.assertFalse(ic.ioc_restart_pending("TESTIOC"))
 def test_restart_iocs_and_get_ioc_status(self):
     ic = IocControl("", MockProcServWrapper())
     ic.start_iocs(["TESTIOC1", "TESTIOC2"])
     ic.restart_iocs(["TESTIOC1", "TESTIOC2"])
     self.assertEqual(ic.get_ioc_status("TESTIOC1"), "RUNNING")
     self.assertEqual(ic.get_ioc_status("TESTIOC2"), "RUNNING")