Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_changing_options_when_using_yaml (broke after #1141) #1159

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions tests/test_config_flow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Test Adaptive Lighting config flow."""

from unittest.mock import patch

from homeassistant.components.adaptive_lighting.const import (
CONF_SUNRISE_TIME,
CONF_SUNSET_TIME,
Expand Down Expand Up @@ -114,9 +116,6 @@ async def test_import_twice(hass):
)


# TODO: Fix, broken for all supported versions
# But in ≤2024.5 it gives homeassistant.config_entries.UnknownEntry: cd69dbda65bd3f86e9a32d974cdfa23f
# and ≥2024.6 it times out
async def test_changing_options_when_using_yaml(hass):
"""Test changing options when using YAML."""
entry = MockConfigEntry(
Expand All @@ -127,9 +126,9 @@ async def test_changing_options_when_using_yaml(hass):
options={},
)
entry.add_to_hass(hass)

await hass.block_till_done()
await hass.config_entries.async_setup(entry.entry_id)
with patch.object(hass.config_entries, "async_forward_entry_setups"):
await hass.config_entries.async_setup(entry.entry_id)
await hass.block_till_done()

result = await hass.config_entries.options.async_init(entry.entry_id)
result = await hass.config_entries.options.async_configure(
Expand Down
Loading