Skip to content

Commit b0f102f

Browse files
committed
Try alternative test-method
1 parent 04c021f commit b0f102f

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

tests/components/plugwise/test_init.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from freezegun.api import FrozenDateTimeFactory
1717
from homeassistant.components.plugwise.const import DOMAIN
18-
from homeassistant.components.plugwise.coordinator import PlugwiseDataUpdateCoordinator
1918
from homeassistant.config_entries import ConfigEntryState
2019
from homeassistant.const import (
2120
CONF_HOST,
@@ -137,13 +136,10 @@ async def test_coordinator_connect_exceptions(
137136
) -> None:
138137
"""Ensure _connect raises translated errors."""
139138
mock_smile_anna.connect.side_effect = side_effect
140-
coordinator = PlugwiseDataUpdateCoordinator(
141-
hass,
142-
cooldown=0,
143-
config_entry=mock_config_entry,
144-
)
145139
with pytest.raises(expected_raise):
146-
await coordinator._connect()
140+
mock_config_entry.add_to_hass(hass)
141+
await hass.config_entries.async_setup(mock_config_entry.entry_id)
142+
await hass.async_block_till_done()
147143

148144

149145
@pytest.mark.parametrize("chosen_env", ["p1v4_442_single"], indirect=True)

0 commit comments

Comments
 (0)