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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user