Exemple #1
0
 def setUp(cls):
     cls.hsm._current_state = Standby(cls.hsm)
Exemple #2
0
 def test_calling_next_state_shall_change_current_state(cls):
     cls.hsm._current_state = Standby  # initial state
     cls.hsm._next_state('active')
     cls.assertEqual(isinstance(cls.hsm._current_state, Active), True)
     cls.hsm._current_state = Standby(cls.hsm)  # initial state