File tree Expand file tree Collapse file tree
tests/components/plugwise Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616from freezegun .api import FrozenDateTimeFactory
1717from homeassistant .components .plugwise .const import DOMAIN
18- from homeassistant .components .plugwise .coordinator import PlugwiseDataUpdateCoordinator
1918from homeassistant .config_entries import ConfigEntryState
2019from 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 )
You can’t perform that action at this time.
0 commit comments