mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-04-23 12:47:16 +00:00

* Add new time handling * migrate date for python3.9 * add timedate * add tests & simplify it * better testing * use ssl * use hostname with new interface * expose to API * update data * add base handler * new timezone handling * improve handling * Improve handling * Add tests * Time adjustment function * Fix logging * tweak condition * don't adjust synchronized time * Guard * ignore UTC * small cleanup * like that, we can leaf it * add URL * add comment * Apply suggestions from code review Co-authored-by: Joakim Sørensen <joasoe@gmail.com> Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
17 lines
428 B
Python
17 lines
428 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.value
|
|
|
|
coresys.core.state = CoreState.SHUTDOWN
|
|
|
|
assert run_dir.read_text() == CoreState.SHUTDOWN.value
|