@asyncio.coroutine
def test_extract_from_service_returns_all_if_no_entity_id(hass):
    'Test the extraction of everything from service.'
    component = EntityComponent(_LOGGER, DOMAIN, hass)
    (yield from component.async_add_entities([MockEntity(name='test_1'), MockEntity(name='test_2')]))
    call = ha.ServiceCall('test', 'service')
    assert (['test_domain.test_1', 'test_domain.test_2'] == sorted((ent.entity_id for ent in (yield from component.async_extract_from_service(call)))))
Test the extraction of everything from service.
@asyncio.coroutine
def test_extract_from_service_returns_all_if_no_entity_id(hass):
    
    component = EntityComponent(_LOGGER, DOMAIN, hass)
    (yield from component.async_add_entities([MockEntity(name='test_1'), MockEntity(name='test_2')]))
    call = ha.ServiceCall('test', 'service')
    assert (['test_domain.test_1', 'test_domain.test_2'] == sorted((ent.entity_id for ent in (yield from component.async_extract_from_service(call)))))