mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Remove non required Home Connect tests (#144024)
This commit is contained in:
parent
17360ede28
commit
bc47049d42
@ -40,18 +40,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.BINARY_SENSOR]
|
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)
|
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
appliance: HomeAppliance,
|
appliance: HomeAppliance,
|
||||||
|
@ -32,19 +32,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.BUTTON]
|
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)
|
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
appliance: HomeAppliance,
|
appliance: HomeAppliance,
|
||||||
|
@ -79,33 +79,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.SENSOR, Platform.SWITCH]
|
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.usefixtures("setup_credentials")
|
||||||
@pytest.mark.parametrize("platforms", [("binary_sensor",)])
|
@pytest.mark.parametrize("platforms", [("binary_sensor",)])
|
||||||
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
||||||
|
@ -57,18 +57,6 @@ async def test_entry_setup(
|
|||||||
assert config_entry.state == ConfigEntryState.NOT_LOADED
|
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])
|
@pytest.mark.parametrize("token_expiration_time", [12345])
|
||||||
async def test_token_refresh_success(
|
async def test_token_refresh_success(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
|
@ -53,18 +53,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.LIGHT]
|
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)
|
@pytest.mark.parametrize("appliance", ["Hood"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
appliance: HomeAppliance,
|
appliance: HomeAppliance,
|
||||||
|
@ -58,18 +58,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.NUMBER]
|
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)
|
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
appliance: HomeAppliance,
|
appliance: HomeAppliance,
|
||||||
|
@ -62,18 +62,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.SELECT]
|
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)
|
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
appliance: HomeAppliance,
|
appliance: HomeAppliance,
|
||||||
|
@ -89,18 +89,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.SENSOR]
|
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)
|
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
appliance: HomeAppliance,
|
appliance: HomeAppliance,
|
||||||
|
@ -69,19 +69,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.SWITCH]
|
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)
|
@pytest.mark.parametrize("appliance", ["Washer"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
appliance: HomeAppliance,
|
appliance: HomeAppliance,
|
||||||
|
@ -45,18 +45,6 @@ def platforms() -> list[str]:
|
|||||||
return [Platform.TIME]
|
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.usefixtures("entity_registry_enabled_by_default")
|
||||||
@pytest.mark.parametrize("appliance", ["Oven"], indirect=True)
|
@pytest.mark.parametrize("appliance", ["Oven"], indirect=True)
|
||||||
async def test_paired_depaired_devices_flow(
|
async def test_paired_depaired_devices_flow(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user