mirror of
https://github.com/home-assistant/core.git
synced 2025-08-31 16:11:00 +00:00
Don't load themes in safe mode (#102683)
This commit is contained in:
@@ -180,10 +180,17 @@ async def test_themes_api(hass: HomeAssistant, themes_ws_client) -> None:
|
||||
await themes_ws_client.send_json({"id": 6, "type": "frontend/get_themes"})
|
||||
msg = await themes_ws_client.receive_json()
|
||||
|
||||
assert msg["result"]["default_theme"] == "recovery_mode"
|
||||
assert msg["result"]["themes"] == {
|
||||
"recovery_mode": {"primary-color": "#db4437", "accent-color": "#ffca28"}
|
||||
}
|
||||
assert msg["result"]["default_theme"] == "default"
|
||||
assert msg["result"]["themes"] == {}
|
||||
|
||||
# safe mode
|
||||
hass.config.recovery_mode = False
|
||||
hass.config.safe_mode = True
|
||||
await themes_ws_client.send_json({"id": 7, "type": "frontend/get_themes"})
|
||||
msg = await themes_ws_client.receive_json()
|
||||
|
||||
assert msg["result"]["default_theme"] == "default"
|
||||
assert msg["result"]["themes"] == {}
|
||||
|
||||
|
||||
async def test_themes_persist(
|
||||
|
Reference in New Issue
Block a user