mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-06-18 16:06:30 +00:00

* Use newer StrEnum and IntEnum over Enum * Fix validation issue and remove unnecessary .value calls --------- Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
17 lines
416 B
Python
17 lines
416 B
Python
"""Testing handling with CoreState."""
|
|
|
|
from supervisor.const import CoreState
|
|
from supervisor.coresys import CoreSys
|
|
|
|
|
|
def test_write_state(run_dir, coresys: CoreSys):
|
|
"""Test write corestate to /run/supervisor."""
|
|
|
|
coresys.core.state = CoreState.RUNNING
|
|
|
|
assert run_dir.read_text() == CoreState.RUNNING
|
|
|
|
coresys.core.state = CoreState.SHUTDOWN
|
|
|
|
assert run_dir.read_text() == CoreState.SHUTDOWN
|