def setUp(cls): cls.hsm._current_state = Standby(cls.hsm)
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