def test_setup_loads_platforms(self):
    'Test the loading of the platforms.'
    component_setup = Mock(return_value=True)
    platform_setup = Mock(return_value=None)
    mock_integration(self.hass, MockModule('test_component', setup=component_setup))
    mock_integration(self.hass, MockModule('mod2', dependencies=['test_component']))
    mock_entity_platform(self.hass, 'test_domain.mod2', MockPlatform(platform_setup))
    component = EntityComponent(_LOGGER, DOMAIN, self.hass)
    assert (not component_setup.called)
    assert (not platform_setup.called)
    component.setup({DOMAIN: {'platform': 'mod2'}})
    self.hass.block_till_done()
    assert component_setup.called
    assert platform_setup.called
Test the loading of the platforms.
def test_setup_loads_platforms(self):
    
    component_setup = Mock(return_value=True)
    platform_setup = Mock(return_value=None)
    mock_integration(self.hass, MockModule('test_component', setup=component_setup))
    mock_integration(self.hass, MockModule('mod2', dependencies=['test_component']))
    mock_entity_platform(self.hass, 'test_domain.mod2', MockPlatform(platform_setup))
    component = EntityComponent(_LOGGER, DOMAIN, self.hass)
    assert (not component_setup.called)
    assert (not platform_setup.called)
    component.setup({DOMAIN: {'platform': 'mod2'}})
    self.hass.block_till_done()
    assert component_setup.called
    assert platform_setup.called