From bc47049d42079e52c2df656c4335bc191fa5bba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Diego=20Rodr=C3=ADguez=20Royo?= Date: Thu, 1 May 2025 10:18:32 +0200 Subject: [PATCH] Remove non required Home Connect tests (#144024) --- .../home_connect/test_binary_sensor.py | 12 --------- tests/components/home_connect/test_button.py | 13 --------- .../home_connect/test_coordinator.py | 27 ------------------- tests/components/home_connect/test_init.py | 12 --------- tests/components/home_connect/test_light.py | 12 --------- tests/components/home_connect/test_number.py | 12 --------- tests/components/home_connect/test_select.py | 12 --------- tests/components/home_connect/test_sensor.py | 12 --------- tests/components/home_connect/test_switch.py | 13 --------- tests/components/home_connect/test_time.py | 12 --------- 10 files changed, 137 deletions(-) diff --git a/tests/components/home_connect/test_binary_sensor.py b/tests/components/home_connect/test_binary_sensor.py index 509003ad931..46da0fc0d8f 100644 --- a/tests/components/home_connect/test_binary_sensor.py +++ b/tests/components/home_connect/test_binary_sensor.py @@ -40,18 +40,6 @@ def platforms() -> list[str]: return [Platform.BINARY_SENSOR] -async def test_binary_sensors( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test binary sensor entities.""" - assert config_entry.state == ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state == ConfigEntryState.LOADED - - @pytest.mark.parametrize("appliance", ["Washer"], indirect=True) async def test_paired_depaired_devices_flow( appliance: HomeAppliance, diff --git a/tests/components/home_connect/test_button.py b/tests/components/home_connect/test_button.py index c96fe840238..cb3a16fa76c 100644 --- a/tests/components/home_connect/test_button.py +++ b/tests/components/home_connect/test_button.py @@ -32,19 +32,6 @@ def platforms() -> list[str]: return [Platform.BUTTON] -async def test_buttons( - hass: HomeAssistant, - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test button entities.""" - assert config_entry.state == ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state == ConfigEntryState.LOADED - - @pytest.mark.parametrize("appliance", ["Washer"], indirect=True) async def test_paired_depaired_devices_flow( appliance: HomeAppliance, diff --git a/tests/components/home_connect/test_coordinator.py b/tests/components/home_connect/test_coordinator.py index 31bb6d8d6a7..36ca5cf0879 100644 --- a/tests/components/home_connect/test_coordinator.py +++ b/tests/components/home_connect/test_coordinator.py @@ -79,33 +79,6 @@ def platforms() -> list[str]: return [Platform.SENSOR, Platform.SWITCH] -async def test_coordinator_update( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test that the coordinator can update.""" - assert config_entry.state == ConfigEntryState.NOT_LOADED - await integration_setup(client) - assert config_entry.state == ConfigEntryState.LOADED - - -async def test_coordinator_update_failing_get_appliances( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client_with_exception: MagicMock, -) -> None: - """Test that the coordinator raises ConfigEntryNotReady when it fails to get appliances.""" - client_with_exception.get_home_appliances.return_value = None - client_with_exception.get_home_appliances.side_effect = HomeConnectError() - - assert config_entry.state == ConfigEntryState.NOT_LOADED - await integration_setup(client_with_exception) - assert config_entry.state == ConfigEntryState.SETUP_RETRY - - @pytest.mark.usefixtures("setup_credentials") @pytest.mark.parametrize("platforms", [("binary_sensor",)]) @pytest.mark.parametrize("appliance", ["Washer"], indirect=True) diff --git a/tests/components/home_connect/test_init.py b/tests/components/home_connect/test_init.py index 2147d9b170a..93a3caa6361 100644 --- a/tests/components/home_connect/test_init.py +++ b/tests/components/home_connect/test_init.py @@ -57,18 +57,6 @@ async def test_entry_setup( assert config_entry.state == ConfigEntryState.NOT_LOADED -async def test_exception_handling( - integration_setup: Callable[[MagicMock], Awaitable[bool]], - config_entry: MockConfigEntry, - setup_credentials: None, - client_with_exception: MagicMock, -) -> None: - """Test exception handling.""" - assert config_entry.state == ConfigEntryState.NOT_LOADED - assert await integration_setup(client_with_exception) - assert config_entry.state == ConfigEntryState.LOADED - - @pytest.mark.parametrize("token_expiration_time", [12345]) async def test_token_refresh_success( hass: HomeAssistant, diff --git a/tests/components/home_connect/test_light.py b/tests/components/home_connect/test_light.py index 298eead1737..4894f223d4e 100644 --- a/tests/components/home_connect/test_light.py +++ b/tests/components/home_connect/test_light.py @@ -53,18 +53,6 @@ def platforms() -> list[str]: return [Platform.LIGHT] -async def test_light( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test switch entities.""" - assert config_entry.state == ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state == ConfigEntryState.LOADED - - @pytest.mark.parametrize("appliance", ["Hood"], indirect=True) async def test_paired_depaired_devices_flow( appliance: HomeAppliance, diff --git a/tests/components/home_connect/test_number.py b/tests/components/home_connect/test_number.py index 7e89f66683b..4de7d662cc3 100644 --- a/tests/components/home_connect/test_number.py +++ b/tests/components/home_connect/test_number.py @@ -58,18 +58,6 @@ def platforms() -> list[str]: return [Platform.NUMBER] -async def test_number( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test number entity.""" - assert config_entry.state is ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state is ConfigEntryState.LOADED - - @pytest.mark.parametrize("appliance", ["Washer"], indirect=True) async def test_paired_depaired_devices_flow( appliance: HomeAppliance, diff --git a/tests/components/home_connect/test_select.py b/tests/components/home_connect/test_select.py index 6d8c090571e..4791b93332f 100644 --- a/tests/components/home_connect/test_select.py +++ b/tests/components/home_connect/test_select.py @@ -62,18 +62,6 @@ def platforms() -> list[str]: return [Platform.SELECT] -async def test_select( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test select entity.""" - assert config_entry.state is ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state is ConfigEntryState.LOADED - - @pytest.mark.parametrize("appliance", ["Washer"], indirect=True) async def test_paired_depaired_devices_flow( appliance: HomeAppliance, diff --git a/tests/components/home_connect/test_sensor.py b/tests/components/home_connect/test_sensor.py index d48befcf73f..a810de049ed 100644 --- a/tests/components/home_connect/test_sensor.py +++ b/tests/components/home_connect/test_sensor.py @@ -89,18 +89,6 @@ def platforms() -> list[str]: return [Platform.SENSOR] -async def test_sensors( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test sensor entities.""" - assert config_entry.state == ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state == ConfigEntryState.LOADED - - @pytest.mark.parametrize("appliance", ["Washer"], indirect=True) async def test_paired_depaired_devices_flow( appliance: HomeAppliance, diff --git a/tests/components/home_connect/test_switch.py b/tests/components/home_connect/test_switch.py index 2f8b95ceab2..6c4c64939ea 100644 --- a/tests/components/home_connect/test_switch.py +++ b/tests/components/home_connect/test_switch.py @@ -69,19 +69,6 @@ def platforms() -> list[str]: return [Platform.SWITCH] -async def test_switches( - hass: HomeAssistant, - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test switch entities.""" - assert config_entry.state == ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state == ConfigEntryState.LOADED - - @pytest.mark.parametrize("appliance", ["Washer"], indirect=True) async def test_paired_depaired_devices_flow( appliance: HomeAppliance, diff --git a/tests/components/home_connect/test_time.py b/tests/components/home_connect/test_time.py index 34781c29eb8..c8275eb3d06 100644 --- a/tests/components/home_connect/test_time.py +++ b/tests/components/home_connect/test_time.py @@ -45,18 +45,6 @@ def platforms() -> list[str]: return [Platform.TIME] -async def test_time( - config_entry: MockConfigEntry, - integration_setup: Callable[[MagicMock], Awaitable[bool]], - setup_credentials: None, - client: MagicMock, -) -> None: - """Test time entity.""" - assert config_entry.state is ConfigEntryState.NOT_LOADED - assert await integration_setup(client) - assert config_entry.state is ConfigEntryState.LOADED - - @pytest.mark.usefixtures("entity_registry_enabled_by_default") @pytest.mark.parametrize("appliance", ["Oven"], indirect=True) async def test_paired_depaired_devices_flow(