Spaces:
Sleeping
Sleeping
File size: 412 Bytes
e984235 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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 == {}
|