mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Remove old test in devolo Home Network (#143095)
This commit is contained in:
parent
ddf37a847d
commit
9fb7542a6f
@ -15,7 +15,7 @@ from homeassistant.components.sensor import DOMAIN as SENSOR
|
|||||||
from homeassistant.components.switch import DOMAIN as SWITCH
|
from homeassistant.components.switch import DOMAIN as SWITCH
|
||||||
from homeassistant.components.update import DOMAIN as UPDATE
|
from homeassistant.components.update import DOMAIN as UPDATE
|
||||||
from homeassistant.config_entries import ConfigEntryState
|
from homeassistant.config_entries import ConfigEntryState
|
||||||
from homeassistant.const import CONF_IP_ADDRESS, EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import device_registry as dr
|
from homeassistant.helpers import device_registry as dr
|
||||||
from homeassistant.helpers.entity_platform import async_get_platforms
|
from homeassistant.helpers.entity_platform import async_get_platforms
|
||||||
@ -24,8 +24,6 @@ from . import configure_integration
|
|||||||
from .const import IP
|
from .const import IP
|
||||||
from .mock import MockDevice
|
from .mock import MockDevice
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"device", ["mock_device", "mock_repeater_device", "mock_ipv6_device"]
|
"device", ["mock_device", "mock_repeater_device", "mock_ipv6_device"]
|
||||||
@ -50,27 +48,6 @@ async def test_setup_entry(
|
|||||||
assert device_info == snapshot
|
assert device_info == snapshot
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("mock_device")
|
|
||||||
async def test_setup_without_password(hass: HomeAssistant) -> None:
|
|
||||||
"""Test setup entry without a device password set like used before HA Core 2022.06."""
|
|
||||||
config = {
|
|
||||||
CONF_IP_ADDRESS: IP,
|
|
||||||
}
|
|
||||||
entry = MockConfigEntry(domain=DOMAIN, data=config)
|
|
||||||
entry.add_to_hass(hass)
|
|
||||||
# Patching async_forward_entry_setup* is not advisable, and should be refactored
|
|
||||||
# in the future.
|
|
||||||
with (
|
|
||||||
patch(
|
|
||||||
"homeassistant.config_entries.ConfigEntries.async_forward_entry_setups",
|
|
||||||
return_value=True,
|
|
||||||
),
|
|
||||||
patch("homeassistant.core.EventBus.async_listen_once"),
|
|
||||||
):
|
|
||||||
assert await hass.config_entries.async_setup(entry.entry_id)
|
|
||||||
assert entry.state is ConfigEntryState.LOADED
|
|
||||||
|
|
||||||
|
|
||||||
async def test_setup_device_not_found(hass: HomeAssistant) -> None:
|
async def test_setup_device_not_found(hass: HomeAssistant) -> None:
|
||||||
"""Test setup entry."""
|
"""Test setup entry."""
|
||||||
entry = configure_integration(hass)
|
entry = configure_integration(hass)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user