mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add default config if not there (#43321)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
@@ -6,7 +6,25 @@ from homeassistant.helpers import selector
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"schema", ({}, {"non_existing": {}}, {"device": {}, "entity": {}})
|
||||
"schema",
|
||||
(
|
||||
{"device": None},
|
||||
{"entity": None},
|
||||
),
|
||||
)
|
||||
def test_valid_base_schema(schema):
|
||||
"""Test base schema validation."""
|
||||
selector.validate_selector(schema)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"schema",
|
||||
(
|
||||
{},
|
||||
{"non_existing": {}},
|
||||
# Two keys
|
||||
{"device": {}, "entity": {}},
|
||||
),
|
||||
)
|
||||
def test_invalid_base_schema(schema):
|
||||
"""Test base schema validation."""
|
||||
|
||||
Reference in New Issue
Block a user