mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 07:25:52 -05:00
Remove strict connection (#116396)
This commit is contained in:
@@ -915,7 +915,6 @@ async def test_websocket_update_preferences(
|
||||
"google_secure_devices_pin": "1234",
|
||||
"tts_default_voice": ["en-GB", "RyanNeural"],
|
||||
"remote_allow_remote_enable": False,
|
||||
"strict_connection": StrictConnectionMode.DROP_CONNECTION,
|
||||
}
|
||||
)
|
||||
response = await client.receive_json()
|
||||
@@ -926,7 +925,6 @@ async def test_websocket_update_preferences(
|
||||
assert cloud.client.prefs.google_secure_devices_pin == "1234"
|
||||
assert cloud.client.prefs.remote_allow_remote_enable is False
|
||||
assert cloud.client.prefs.tts_default_voice == ("en-GB", "RyanNeural")
|
||||
assert cloud.client.prefs.strict_connection is StrictConnectionMode.DROP_CONNECTION
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
@@ -303,6 +303,7 @@ async def test_cloud_logout(
|
||||
assert cloud.is_logged_in is False
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Remove strict connection config option")
|
||||
async def test_service_create_temporary_strict_connection_url_strict_connection_disabled(
|
||||
hass: HomeAssistant,
|
||||
) -> None:
|
||||
@@ -323,6 +324,7 @@ async def test_service_create_temporary_strict_connection_url_strict_connection_
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Remove strict connection config option")
|
||||
@pytest.mark.parametrize(
|
||||
("mode"),
|
||||
[
|
||||
|
||||
@@ -181,6 +181,7 @@ async def test_tts_default_voice_legacy_gender(
|
||||
assert cloud.client.prefs.tts_default_voice == (expected_language, voice)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Remove strict connection config option")
|
||||
@pytest.mark.parametrize("mode", list(StrictConnectionMode))
|
||||
async def test_strict_connection_convertion(
|
||||
hass: HomeAssistant,
|
||||
|
||||
@@ -226,6 +226,7 @@ async def _guard_page_unauthorized_request(
|
||||
assert await req.text() == await hass.async_add_executor_job(read_guard_page)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Remove strict connection config option")
|
||||
@pytest.mark.parametrize(
|
||||
"test_func",
|
||||
[
|
||||
|
||||
@@ -527,6 +527,7 @@ async def test_logging(
|
||||
assert "GET /api/states/logging.entity" not in caplog.text
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Remove strict connection config option")
|
||||
async def test_service_create_temporary_strict_connection_url_strict_connection_disabled(
|
||||
hass: HomeAssistant,
|
||||
) -> None:
|
||||
@@ -544,6 +545,7 @@ async def test_service_create_temporary_strict_connection_url_strict_connection_
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Remove strict connection config option")
|
||||
@pytest.mark.parametrize(
|
||||
("mode"),
|
||||
[
|
||||
|
||||
@@ -800,11 +800,10 @@ async def test_async_get_all_descriptions(hass: HomeAssistant) -> None:
|
||||
assert proxy_load_services_files.mock_calls[0][1][1] == unordered(
|
||||
[
|
||||
await async_get_integration(hass, DOMAIN_GROUP),
|
||||
await async_get_integration(hass, "http"), # system_health requires http
|
||||
]
|
||||
)
|
||||
|
||||
assert len(descriptions) == 2
|
||||
assert len(descriptions) == 1
|
||||
assert DOMAIN_GROUP in descriptions
|
||||
assert "description" in descriptions[DOMAIN_GROUP]["reload"]
|
||||
assert "fields" in descriptions[DOMAIN_GROUP]["reload"]
|
||||
@@ -838,7 +837,7 @@ async def test_async_get_all_descriptions(hass: HomeAssistant) -> None:
|
||||
await async_setup_component(hass, DOMAIN_LOGGER, logger_config)
|
||||
descriptions = await service.async_get_all_descriptions(hass)
|
||||
|
||||
assert len(descriptions) == 3
|
||||
assert len(descriptions) == 2
|
||||
assert DOMAIN_LOGGER in descriptions
|
||||
assert descriptions[DOMAIN_LOGGER]["set_default_level"]["name"] == "Translated name"
|
||||
assert (
|
||||
|
||||
@@ -5,7 +5,6 @@ from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.http.const import StrictConnectionMode
|
||||
from homeassistant.config import YAML_CONFIG_FILE
|
||||
from homeassistant.scripts import check_config
|
||||
|
||||
@@ -135,7 +134,6 @@ def test_secrets(mock_is_file, event_loop, mock_hass_config_yaml: None) -> None:
|
||||
"login_attempts_threshold": -1,
|
||||
"server_port": 8123,
|
||||
"ssl_profile": "modern",
|
||||
"strict_connection": StrictConnectionMode.DISABLED,
|
||||
"use_x_frame_options": True,
|
||||
"server_host": ["0.0.0.0", "::"],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user