Ensure domain is correct format (#58429)

This commit is contained in:
Paulus Schoutsen
2021-10-25 15:56:07 -07:00
committed by GitHub
parent a813608185
commit cd3e51b3e7
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -540,3 +540,9 @@ async def test_custom_integration_missing(hass, caplog):
with pytest.raises(loader.IntegrationNotFound):
await loader.async_get_integration(hass, "test1")
async def test_validation(hass):
"""Test we raise if invalid domain passed in."""
with pytest.raises(ValueError):
await loader.async_get_integration(hass, "some.thing")