mindseye-lab-space / tests /test_state_machine.py
PeacebinfLow's picture
Create tests/test_state_machine.py
e984235 verified
raw
history blame contribute delete
412 Bytes
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 == {}