mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 07:25:52 -05:00
Use runtime_data for BMW (#120837)
This commit is contained in:
@@ -159,7 +159,7 @@ async def test_options_flow_implementation(hass: HomeAssistant) -> None:
|
||||
CONF_READ_ONLY: True,
|
||||
}
|
||||
|
||||
assert len(mock_setup_entry.mock_calls) == 1
|
||||
assert len(mock_setup_entry.mock_calls) == 2
|
||||
|
||||
|
||||
async def test_reauth(hass: HomeAssistant) -> None:
|
||||
@@ -210,4 +210,4 @@ async def test_reauth(hass: HomeAssistant) -> None:
|
||||
assert result2["reason"] == "reauth_successful"
|
||||
assert config_entry.data == FIXTURE_COMPLETE_ENTRY
|
||||
|
||||
assert len(mock_setup_entry.mock_calls) == 1
|
||||
assert len(mock_setup_entry.mock_calls) == 2
|
||||
|
||||
@@ -27,10 +27,7 @@ async def test_update_success(hass: HomeAssistant) -> None:
|
||||
await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert (
|
||||
hass.data[config_entry.domain][config_entry.entry_id].last_update_success
|
||||
is True
|
||||
)
|
||||
assert config_entry.runtime_data.coordinator.last_update_success is True
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("bmw_fixture")
|
||||
@@ -45,7 +42,7 @@ async def test_update_failed(
|
||||
await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
coordinator = hass.data[config_entry.domain][config_entry.entry_id]
|
||||
coordinator = config_entry.runtime_data.coordinator
|
||||
|
||||
assert coordinator.last_update_success is True
|
||||
|
||||
@@ -74,7 +71,7 @@ async def test_update_reauth(
|
||||
await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
coordinator = hass.data[config_entry.domain][config_entry.entry_id]
|
||||
coordinator = config_entry.runtime_data.coordinator
|
||||
|
||||
assert coordinator.last_update_success is True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user