Skip to content

Commit

Permalink
Merge branch 'main' into move-if
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Apr 11, 2024
2 parents 574e696 + 4aaf65d commit f6ef397
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pull_requests_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ jobs:
labels: >-
Breaking Change, Experimental, pr: new-feature,
pr: enhancement, pr: refactor, pr: bugfix,
pr: dependency-update
pr: dependency-update, pr: action, pr: test,
pr: repository
10 changes: 5 additions & 5 deletions tests/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
MockedResponse,
ResponseMocker,
create_config_entry,
get_hacs,
recursive_remove_key,
safe_json_dumps,
)
Expand Down Expand Up @@ -292,16 +293,15 @@ async def test_already_configured(
)


async def test_options_flow(
hass: HomeAssistant, setup_integration: Generator, hacs: HacsBase
) -> None:
async def test_options_flow(hass: HomeAssistant, setup_integration: Generator) -> None:
"""Test reconfiguring."""
config_entry = hass.config_entries.async_entries(DOMAIN)[0]
result = await hass.config_entries.options.async_init(config_entry.entry_id)
assert result["type"] == FlowResultType.FORM
assert result["step_id"] == "user"

# Test defaults
hacs = get_hacs(hass)
schema = result["data_schema"].schema
for key in schema:
assert key.default() == getattr(hacs.configuration, str(key))
Expand Down Expand Up @@ -337,7 +337,7 @@ async def test_options_flow(

# Check config entry is reloaded with new options
await hass.async_block_till_done()
hacs = hass.data[DOMAIN]

# Get a new HACS instance after reload
hacs = get_hacs(hass)
for key, val in config_entry.options.items():
assert getattr(hacs.configuration, str(key)) == val

0 comments on commit f6ef397

Please sign in to comment.