def test_turn_off(self): self.assertEqual(0, apply_action_to_value("turn off", 0)) self.assertEqual(0, apply_action_to_value("turn off", 1)) self.assertEqual(4, apply_action_to_value("turn off", 5))
def test_toggle(self): self.assertEqual(2, apply_action_to_value("toggle", 0)) self.assertEqual(3, apply_action_to_value("toggle", 1))
def test_turn_on(self): result = apply_action_to_value("turn on", 0) self.assertEqual(1, apply_action_to_value("turn on", 0)) self.assertEqual(2, apply_action_to_value("turn on", 1))