mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Rename the safe_mode integration to recovery_mode (#102581)
* Rename safe mode integration to recovery mode * Update code
This commit is contained in:
@@ -103,7 +103,7 @@ async def test_empty_setup(hass: HomeAssistant) -> None:
|
||||
assert domain in hass.config.components, domain
|
||||
|
||||
|
||||
async def test_core_failure_loads_safe_mode(
|
||||
async def test_core_failure_loads_recovery_mode(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test failing core setup aborts further setup."""
|
||||
@@ -495,7 +495,7 @@ async def test_setup_hass(
|
||||
assert "Waiting on integrations to complete setup" not in caplog.text
|
||||
|
||||
assert "browser" in hass.config.components
|
||||
assert "safe_mode" not in hass.config.components
|
||||
assert "recovery_mode" not in hass.config.components
|
||||
|
||||
assert len(mock_enable_logging.mock_calls) == 1
|
||||
assert mock_enable_logging.mock_calls[0][1] == (
|
||||
@@ -578,7 +578,7 @@ async def test_setup_hass_invalid_yaml(
|
||||
),
|
||||
)
|
||||
|
||||
assert "safe_mode" in hass.config.components
|
||||
assert "recovery_mode" in hass.config.components
|
||||
assert len(mock_mount_local_lib_path.mock_calls) == 0
|
||||
|
||||
|
||||
@@ -609,7 +609,7 @@ async def test_setup_hass_config_dir_nonexistent(
|
||||
)
|
||||
|
||||
|
||||
async def test_setup_hass_safe_mode(
|
||||
async def test_setup_hass_recovery_mode(
|
||||
mock_enable_logging: Mock,
|
||||
mock_is_virtual_env: Mock,
|
||||
mock_mount_local_lib_path: AsyncMock,
|
||||
@@ -634,7 +634,7 @@ async def test_setup_hass_safe_mode(
|
||||
),
|
||||
)
|
||||
|
||||
assert "safe_mode" in hass.config.components
|
||||
assert "recovery_mode" in hass.config.components
|
||||
assert len(mock_mount_local_lib_path.mock_calls) == 0
|
||||
|
||||
# Validate we didn't try to set up config entry.
|
||||
@@ -665,7 +665,7 @@ async def test_setup_hass_invalid_core_config(
|
||||
),
|
||||
)
|
||||
|
||||
assert "safe_mode" in hass.config.components
|
||||
assert "recovery_mode" in hass.config.components
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -681,7 +681,7 @@ async def test_setup_hass_invalid_core_config(
|
||||
}
|
||||
],
|
||||
)
|
||||
async def test_setup_safe_mode_if_no_frontend(
|
||||
async def test_setup_recovery_mode_if_no_frontend(
|
||||
mock_hass_config: None,
|
||||
mock_enable_logging: Mock,
|
||||
mock_is_virtual_env: Mock,
|
||||
@@ -690,7 +690,7 @@ async def test_setup_safe_mode_if_no_frontend(
|
||||
mock_process_ha_config_upgrade: Mock,
|
||||
event_loop: asyncio.AbstractEventLoop,
|
||||
) -> None:
|
||||
"""Test we setup safe mode if frontend didn't load."""
|
||||
"""Test we setup recovery mode if frontend didn't load."""
|
||||
verbose = Mock()
|
||||
log_rotate_days = Mock()
|
||||
log_file = Mock()
|
||||
@@ -708,7 +708,7 @@ async def test_setup_safe_mode_if_no_frontend(
|
||||
),
|
||||
)
|
||||
|
||||
assert "safe_mode" in hass.config.components
|
||||
assert "recovery_mode" in hass.config.components
|
||||
assert hass.config.config_dir == get_test_config_dir()
|
||||
assert hass.config.skip_pip
|
||||
assert hass.config.internal_url == "http://192.168.1.100:8123"
|
||||
|
||||
Reference in New Issue
Block a user