mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Fix broken invalid_config tests (#148965)
This commit is contained in:
@@ -54,12 +54,14 @@ def storage_setup(hass: HomeAssistant, hass_storage: dict[str, Any]):
|
||||
return _storage
|
||||
|
||||
|
||||
async def test_config(hass: HomeAssistant) -> None:
|
||||
@pytest.mark.parametrize(
|
||||
"invalid_config",
|
||||
[None, 1, {"name with space": None}],
|
||||
)
|
||||
async def test_config(hass: HomeAssistant, invalid_config) -> None:
|
||||
"""Test config."""
|
||||
invalid_configs = [None, 1, {}, {"name with space": None}]
|
||||
|
||||
for cfg in invalid_configs:
|
||||
assert not await async_setup_component(hass, DOMAIN, {DOMAIN: cfg})
|
||||
assert not await async_setup_component(hass, DOMAIN, {DOMAIN: invalid_config})
|
||||
|
||||
|
||||
async def test_methods(hass: HomeAssistant) -> None:
|
||||
|
||||
Reference in New Issue
Block a user