Skip to content

Commit

Permalink
Fix config entry unique_id collision in tplink tests (home-assistant#…
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored Oct 4, 2024
1 parent c191a7c commit 8754b54
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions tests/components/tplink/test_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ async def test_button(
) -> None:
"""Test a sensor unique ids."""
mocked_feature = mocked_feature_button
already_migrated_config_entry = MockConfigEntry(
domain=DOMAIN, data={CONF_HOST: "127.0.0.1"}, unique_id=MAC_ADDRESS
)
already_migrated_config_entry.add_to_hass(hass)

plug = _mocked_device(alias="my_device", features=[mocked_feature])
with _patch_discovery(device=plug), _patch_connect(device=plug):
await async_setup_component(hass, tplink.DOMAIN, {tplink.DOMAIN: {}})
Expand All @@ -150,10 +145,6 @@ async def test_button_children(
) -> None:
"""Test a sensor unique ids."""
mocked_feature = mocked_feature_button
already_migrated_config_entry = MockConfigEntry(
domain=DOMAIN, data={CONF_HOST: "127.0.0.1"}, unique_id=MAC_ADDRESS
)
already_migrated_config_entry.add_to_hass(hass)
plug = _mocked_device(
alias="my_device",
features=[mocked_feature],
Expand Down Expand Up @@ -187,10 +178,6 @@ async def test_button_press(
) -> None:
"""Test a number entity limits and setting values."""
mocked_feature = mocked_feature_button
already_migrated_config_entry = MockConfigEntry(
domain=DOMAIN, data={CONF_HOST: "127.0.0.1"}, unique_id=MAC_ADDRESS
)
already_migrated_config_entry.add_to_hass(hass)
plug = _mocked_device(alias="my_device", features=[mocked_feature])
with _patch_discovery(device=plug), _patch_connect(device=plug):
await async_setup_component(hass, tplink.DOMAIN, {tplink.DOMAIN: {}})
Expand Down

0 comments on commit 8754b54

Please sign in to comment.