Do async_setup_platform in background (#36244)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Paulus SchoutsenandJ. Nick Koston authored and GitHub committed 2020-05-31 22:18:30 -07:00
1 parent d488c779fc
commit 276f3afb00
161 files changed
+1184 -305

No files matched your search

+2 -2
View File
@@ -180,7 +180,7 @@ async def test_platform_not_ready(hass):
component = EntityComponent(_LOGGER, DOMAIN, hass)
await component.async_setup({DOMAIN: {"platform": "mod1"}})
await hass.async_block_till_done()
assert len(platform1_setup.mock_calls) == 1
assert "test_domain.mod1" not in hass.config.components
@@ -280,7 +280,7 @@ async def test_setup_dependencies_platform(hass):
component = EntityComponent(_LOGGER, DOMAIN, hass)
await component.async_setup({DOMAIN: {"platform": "test_component"}})
await hass.async_block_till_done()
assert "test_component" in hass.config.components
assert "test_component2" in hass.config.components
assert "test_domain.test_component" in hass.config.components