Avoid directly changing config entry state in tests (part 2) (#110115)

followup to #110048 for more places
This commit is contained in:
J. Nick Koston 2024-02-10 00:20:15 -06:00 committed by GitHub
parent 567a179084
commit f6d4617c7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 22 additions and 22 deletions

View file

@ -2435,7 +2435,7 @@ async def test_execute_script_with_dynamically_validated_action(
)
config_entry = MockConfigEntry(domain="fake_integration", data={})
config_entry.state = config_entries.ConfigEntryState.LOADED
config_entry.mock_state(hass, config_entries.ConfigEntryState.LOADED)
config_entry.add_to_hass(hass)
device_entry = device_registry.async_get_or_create(
config_entry_id=config_entry.entry_id,