@asyncio.coroutine
def test_setup_dependencies_platform(hass):
    "Test we setup the dependencies of a platform.\n\n    We're explictely testing that we process dependencies even if a component\n    with the same name has already been loaded.\n    "
    loader.set_component(hass, 'test_component', MockModule('test_component', dependencies=['test_component2']))
    loader.set_component(hass, 'test_component2', MockModule('test_component2'))
    loader.set_component(hass, 'test_component.test_domain', MockPlatform())
    component = EntityComponent(_LOGGER, DOMAIN, hass)
    (yield from component.async_setup({DOMAIN: {'platform': 'test_component'}}))
    assert ('test_component' in hass.config.components)
    assert ('test_component2' in hass.config.components)
    assert ('test_domain.test_component' in hass.config.components)
Test we setup the dependencies of a platform.

We're explictely testing that we process dependencies even if a component
with the same name has already been loaded.
@asyncio.coroutine
def test_setup_dependencies_platform(hass):
    "Test we setup the dependencies of a platform.\n\n    We're explictely testing that we process dependencies even if a component\n    with the same name has already been loaded.\n    "
    loader.set_component(hass, 'test_component', MockModule('test_component', dependencies=['test_component2']))
    loader.set_component(hass, 'test_component2', MockModule('test_component2'))
    loader.set_component(hass, 'test_component.test_domain', MockPlatform())
    component = EntityComponent(_LOGGER, DOMAIN, hass)
    (yield from component.async_setup({DOMAIN: {'platform': 'test_component'}}))
    assert ('test_component' in hass.config.components)
    assert ('test_component2' in hass.config.components)
    assert ('test_domain.test_component' in hass.config.components)