mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 12:29:55 +00:00
Only raise integrationnotfound for dependencies (#48241)
Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
@@ -1046,10 +1046,15 @@ async def get_system_health_info(hass, domain):
|
||||
return await hass.data["system_health"][domain].info_callback(hass)
|
||||
|
||||
|
||||
def mock_integration(hass, module):
|
||||
def mock_integration(hass, module, built_in=True):
|
||||
"""Mock an integration."""
|
||||
integration = loader.Integration(
|
||||
hass, f"homeassistant.components.{module.DOMAIN}", None, module.mock_manifest()
|
||||
hass,
|
||||
f"{loader.PACKAGE_BUILTIN}.{module.DOMAIN}"
|
||||
if built_in
|
||||
else f"{loader.PACKAGE_CUSTOM_COMPONENTS}.{module.DOMAIN}",
|
||||
None,
|
||||
module.mock_manifest(),
|
||||
)
|
||||
|
||||
def mock_import_platform(platform_name):
|
||||
|
||||
Reference in New Issue
Block a user