mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add domain key config validation (#104242)
* Drop use of regex in helpers.extract_domain_configs * Update test * Revert test update * Add domain_from_config_key helper * Add validator * Address review comment * Update snapshots * Inline domain_from_config_key in validator
This commit is contained in:
@@ -2043,7 +2043,7 @@ async def test_component_config_validation_error(
|
||||
|
||||
for domain_with_label in config:
|
||||
integration = await async_get_integration(
|
||||
hass, domain_with_label.partition(" ")[0]
|
||||
hass, cv.domain_key(domain_with_label)
|
||||
)
|
||||
await config_util.async_process_component_and_handle_errors(
|
||||
hass,
|
||||
@@ -2088,7 +2088,7 @@ async def test_component_config_validation_error_with_docs(
|
||||
|
||||
for domain_with_label in config:
|
||||
integration = await async_get_integration(
|
||||
hass, domain_with_label.partition(" ")[0]
|
||||
hass, cv.domain_key(domain_with_label)
|
||||
)
|
||||
await config_util.async_process_component_and_handle_errors(
|
||||
hass,
|
||||
|
||||
Reference in New Issue
Block a user