mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 20:35:55 +00:00
Add blockbuster library and find I/O from unit tests (#5731)
* Add blockbuster library and find I/O from unit tests * Fix lint and test issue * Fixes from feedback * Avoid modifying webapp object in executor * Split su options validation and only validate timezone on change
This commit is contained in:
@@ -233,3 +233,17 @@ async def test_api_supervisor_reload(api_client: TestClient):
|
||||
"""Test supervisor reload."""
|
||||
resp = await api_client.post("/supervisor/reload")
|
||||
assert resp.status == 200
|
||||
|
||||
|
||||
async def test_api_supervisor_options_timezone(
|
||||
api_client: TestClient, coresys: CoreSys
|
||||
):
|
||||
"""Test setting supervisor timezone via API."""
|
||||
assert coresys.timezone == "Etc/UTC"
|
||||
|
||||
resp = await api_client.post(
|
||||
"/supervisor/options", json={"timezone": "Europe/Zurich"}
|
||||
)
|
||||
assert resp.status == 200
|
||||
|
||||
assert coresys.timezone == "Europe/Zurich"
|
||||
|
||||
Reference in New Issue
Block a user