Spaces:
Sleeping
Sleeping
| from src.state_machine import StateMachine | |
| def test_mode_transition(): | |
| sm = StateMachine() | |
| assert sm.current_state.value == "CORE_OS" | |
| sm.transition("MODE LEDGER_CORE") | |
| assert sm.current_state.value == "LEDGER_CORE" | |
| def test_reset(): | |
| sm = StateMachine() | |
| sm.transition("MODE SQL_CORE") | |
| sm.transition("RESET") | |
| assert sm.current_state.value == "CORE_OS" | |
| assert sm.context == {} | |