1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

End deprecation setting attributes directly on config entry (#123729)

* End deprecation setting attr directly on config entry

* Update ollama test

* Fix android_tv
This commit is contained in:
G Johansson
2024-09-03 16:56:00 +03:00
committed by GitHub
parent 7c15075231
commit 436ac72b82
5 changed files with 18 additions and 37 deletions

View File

@@ -5437,13 +5437,8 @@ async def test_report_direct_mutation_of_config_entry(
entry = MockConfigEntry(domain="test")
entry.add_to_hass(hass)
setattr(entry, field, "new_value")
assert (
f'Detected code that sets "{field}" directly to update a config entry. '
"This is deprecated and will stop working in Home Assistant 2024.9, "
"it should be updated to use async_update_entry instead. Please report this issue."
) in caplog.text
with pytest.raises(AttributeError):
setattr(entry, field, "new_value")
async def test_updating_non_added_entry_raises(hass: HomeAssistant) -> None: