mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Make it possible to restart core in safe mode (#102606)
This commit is contained in:
@@ -374,7 +374,9 @@ async def test_missing_themes(hass: HomeAssistant, ws_client) -> None:
|
||||
assert msg["result"]["themes"] == {}
|
||||
|
||||
|
||||
async def test_extra_js(mock_http_client_with_extra_js, mock_onboarded):
|
||||
async def test_extra_js(
|
||||
hass: HomeAssistant, mock_http_client_with_extra_js, mock_onboarded
|
||||
):
|
||||
"""Test that extra javascript is loaded."""
|
||||
resp = await mock_http_client_with_extra_js.get("")
|
||||
assert resp.status == 200
|
||||
@@ -384,6 +386,16 @@ async def test_extra_js(mock_http_client_with_extra_js, mock_onboarded):
|
||||
assert '"/local/my_module.js"' in text
|
||||
assert '"/local/my_es5.js"' in text
|
||||
|
||||
# safe mode
|
||||
hass.config.safe_mode = True
|
||||
resp = await mock_http_client_with_extra_js.get("")
|
||||
assert resp.status == 200
|
||||
assert "cache-control" not in resp.headers
|
||||
|
||||
text = await resp.text()
|
||||
assert '"/local/my_module.js"' not in text
|
||||
assert '"/local/my_es5.js"' not in text
|
||||
|
||||
|
||||
async def test_get_panels(
|
||||
hass: HomeAssistant, hass_ws_client: WebSocketGenerator, mock_http_client
|
||||
|
||||
Reference in New Issue
Block a user