mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-06-21 17:36:30 +00:00
16 lines
380 B
Python
16 lines
380 B
Python
"""Testing handling with CoreState."""
|
|
|
|
from supervisor.const import CoreState
|
|
|
|
|
|
def test_write_state(run_dir, coresys):
|
|
"""Test write corestate to /run/supervisor."""
|
|
|
|
coresys.core.state = CoreState.RUNNING
|
|
|
|
assert run_dir.read_text() == CoreState.RUNNING.value
|
|
|
|
coresys.core.state = CoreState.SHUTDOWN
|
|
|
|
assert run_dir.read_text() == CoreState.SHUTDOWN.value
|