From 2001134cdedbe91d36c29309540421d52da66e9d Mon Sep 17 00:00:00 2001 From: jb101010-2 Date: Sat, 28 Dec 2024 09:09:30 +0100 Subject: [PATCH] review again --- .../components/suez_water/__init__.py | 1 - tests/components/suez_water/test_init.py | 24 +------------------ 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/homeassistant/components/suez_water/__init__.py b/homeassistant/components/suez_water/__init__.py index fbb23ba5dae78..30f8c030c2648 100644 --- a/homeassistant/components/suez_water/__init__.py +++ b/homeassistant/components/suez_water/__init__.py @@ -44,7 +44,6 @@ async def async_migrate_entry( ) if config_entry.version > 2: - _LOGGER.error("Suez_water version downgrade not handled") return False if config_entry.version == 1: diff --git a/tests/components/suez_water/test_init.py b/tests/components/suez_water/test_init.py index 77bc66eb1c527..1881e816c9d75 100644 --- a/tests/components/suez_water/test_init.py +++ b/tests/components/suez_water/test_init.py @@ -84,32 +84,10 @@ async def test_migration_version_1_to_2( title=MOCK_DATA[CONF_USERNAME], data=MOCK_DATA, version=1, - minor_version=0, ) await setup_integration(hass, past_entry) assert past_entry.state is ConfigEntryState.LOADED assert past_entry.unique_id == MOCK_DATA[CONF_COUNTER_ID] assert past_entry.title == MOCK_DATA[CONF_USERNAME] - - -async def test_migration_version_1_to_2_int_counter( - hass: HomeAssistant, - suez_client: AsyncMock, -) -> None: - """Test that a migration from 1 to 2 change use int counter_id as str unique_id.""" - data = MOCK_DATA.copy() - data[CONF_COUNTER_ID] = 1234 - past_entry = MockConfigEntry( - unique_id=data[CONF_USERNAME], - domain=DOMAIN, - title=data[CONF_USERNAME], - data=data, - version=1, - minor_version=0, - ) - - await setup_integration(hass, past_entry) - assert past_entry.state is ConfigEntryState.LOADED - assert past_entry.unique_id == str(data[CONF_COUNTER_ID]) - assert past_entry.title == data[CONF_USERNAME] + assert past_entry.version == 2