@asyncio.coroutine
def test_extract_from_service_no_group_expand(hass):
    'Test not expanding a group.'
    component = EntityComponent(_LOGGER, DOMAIN, hass)
    test_group = (yield from group.Group.async_create_group(hass, 'test_group', ['light.Ceiling', 'light.Kitchen']))
    (yield from component.async_add_entities([test_group]))
    call = ha.ServiceCall('test', 'service', {'entity_id': ['group.test_group']})
    extracted = (yield from component.async_extract_from_service(call, expand_group=False))
    assert (extracted == [test_group])
Test not expanding a group.
@asyncio.coroutine
def test_extract_from_service_no_group_expand(hass):
    
    component = EntityComponent(_LOGGER, DOMAIN, hass)
    test_group = (yield from group.Group.async_create_group(hass, 'test_group', ['light.Ceiling', 'light.Kitchen']))
    (yield from component.async_add_entities([test_group]))
    call = ha.ServiceCall('test', 'service', {'entity_id': ['group.test_group']})
    extracted = (yield from component.async_extract_from_service(call, expand_group=False))
    assert (extracted == [test_group])