def test_dualWaitIncrement(self): """ Test the method handling incrementing both waits """ controller = TrafficLightController("TEST") controller.IncrementBothWaits() self.assertEqual(controller.GetRightWait(), 1, msg="Right wait") self.assertEqual(controller.GetOtherWait(), 1, msg="Other wait")
def test_dualWaitReset(self): """ Test wait functions which do both at once """ controller = TrafficLightController("TEST") controller.IncrementBothWaits() self.assertEqual(controller.GetRightWait(), 1, msg="Right wait") self.assertEqual(controller.GetOtherWait(), 1, msg="Other wait") controller.ResetBothWaits() self.assertEqual(controller.GetRightWait(), 0, msg="Right wait") self.assertEqual(controller.GetOtherWait(), 0, msg="Other wait")