supervisor/tests/test_core_state.py
Pascal Vizeli 0f60fdd20b
Make api soon available (#2119)
* Make api soon available

* add more tests
2020-10-12 15:56:29 +02:00

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