Allow disabling integrations in manifest, block uuid package being installed and disable ezviz (#38444)

This commit is contained in:
Paulus Schoutsen
2020-08-26 10:20:14 +02:00
committed by GitHub
parent eaac00acfc
commit 2a9da208d4
11 changed files with 40 additions and 5 deletions

View File

@@ -583,3 +583,15 @@ async def test_parallel_entry_setup(hass):
await setup.async_setup_component(hass, "comp", {})
assert calls == [1, 2, 1, 2]
async def test_integration_disabled(hass, caplog):
"""Test we can disable an integration."""
disabled_reason = "Dependency contains code that breaks Home Assistant"
mock_integration(
hass,
MockModule("test_component1", partial_manifest={"disabled": disabled_reason}),
)
result = await setup.async_setup_component(hass, "test_component1", {})
assert not result
assert disabled_reason in caplog.text