mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Fix config entry unique_id collision in tplink tests (#127522)
This commit is contained in:
parent
c191a7cfdb
commit
8754b54d81
@ -123,11 +123,6 @@ async def test_button(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test a sensor unique ids."""
|
"""Test a sensor unique ids."""
|
||||||
mocked_feature = mocked_feature_button
|
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])
|
plug = _mocked_device(alias="my_device", features=[mocked_feature])
|
||||||
with _patch_discovery(device=plug), _patch_connect(device=plug):
|
with _patch_discovery(device=plug), _patch_connect(device=plug):
|
||||||
await async_setup_component(hass, tplink.DOMAIN, {tplink.DOMAIN: {}})
|
await async_setup_component(hass, tplink.DOMAIN, {tplink.DOMAIN: {}})
|
||||||
@ -150,10 +145,6 @@ async def test_button_children(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test a sensor unique ids."""
|
"""Test a sensor unique ids."""
|
||||||
mocked_feature = mocked_feature_button
|
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(
|
plug = _mocked_device(
|
||||||
alias="my_device",
|
alias="my_device",
|
||||||
features=[mocked_feature],
|
features=[mocked_feature],
|
||||||
@ -187,10 +178,6 @@ async def test_button_press(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test a number entity limits and setting values."""
|
"""Test a number entity limits and setting values."""
|
||||||
mocked_feature = mocked_feature_button
|
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])
|
plug = _mocked_device(alias="my_device", features=[mocked_feature])
|
||||||
with _patch_discovery(device=plug), _patch_connect(device=plug):
|
with _patch_discovery(device=plug), _patch_connect(device=plug):
|
||||||
await async_setup_component(hass, tplink.DOMAIN, {tplink.DOMAIN: {}})
|
await async_setup_component(hass, tplink.DOMAIN, {tplink.DOMAIN: {}})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user