mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix check config (#43663)
This commit is contained in:
@@ -203,8 +203,8 @@ async def test_domain_blueprints_get_blueprint_errors(hass, domain_bps):
|
||||
|
||||
with patch(
|
||||
"homeassistant.util.yaml.load_yaml", return_value={"blueprint": "invalid"}
|
||||
):
|
||||
assert await domain_bps.async_get_blueprint("non-existing-path") is None
|
||||
), pytest.raises(errors.FailedToLoad):
|
||||
await domain_bps.async_get_blueprint("non-existing-path")
|
||||
|
||||
|
||||
async def test_domain_blueprints_caching(domain_bps):
|
||||
@@ -258,3 +258,11 @@ async def test_domain_blueprints_add_blueprint(domain_bps, blueprint_1):
|
||||
with patch.object(domain_bps, "_load_blueprint") as mock_load:
|
||||
assert await domain_bps.async_get_blueprint("something.yaml") == blueprint_1
|
||||
assert not mock_load.mock_calls
|
||||
|
||||
|
||||
async def test_inputs_from_config_nonexisting_blueprint(domain_bps):
|
||||
"""Test referring non-existing blueprint."""
|
||||
with pytest.raises(errors.FailedToLoad):
|
||||
await domain_bps.async_inputs_from_config(
|
||||
{"use_blueprint": {"path": "non-existing.yaml"}}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user