async def test_webhook_handle_get_zones(hass, create_registrations, webhook_client):
    'Test that we can get zones properly.'
    (await async_setup_component(hass, ZONE_DOMAIN, {ZONE_DOMAIN: {}}))
    resp = (await webhook_client.post('/api/webhook/{}'.format(create_registrations[1]['webhook_id']), json={'type': 'get_zones'}))
    assert (resp.status == 200)
    json = (await resp.json())
    assert (len(json) == 1)
    zones = sorted(json, key=(lambda entry: entry['entity_id']))
    assert (zones[0]['entity_id'] == 'zone.home')
Test that we can get zones properly.
async def test_webhook_handle_get_zones(hass, create_registrations, webhook_client):
    
    (await async_setup_component(hass, ZONE_DOMAIN, {ZONE_DOMAIN: {}}))
    resp = (await webhook_client.post('/api/webhook/{}'.format(create_registrations[1]['webhook_id']), json={'type': 'get_zones'}))
    assert (resp.status == 200)
    json = (await resp.json())
    assert (len(json) == 1)
    zones = sorted(json, key=(lambda entry: entry['entity_id']))
    assert (zones[0]['entity_id'] == 'zone.home')