async def test_fetch_period_api_with_use_include_order(hass, hass_client):
    'Test the fetch period view for history with include order.'
    (await hass.async_add_executor_job(init_recorder_component, hass))
    (await async_setup_component(hass, 'history', {history.DOMAIN: {history.CONF_ORDER: True}}))
    (await hass.async_add_executor_job(hass.data[recorder.DATA_INSTANCE].block_till_done))
    client = (await hass_client())
    response = (await client.get(f'/api/history/period/{dt_util.utcnow().isoformat()}'))
    assert (response.status == 200)
Test the fetch period view for history with include order.
async def test_fetch_period_api_with_use_include_order(hass, hass_client):
    
    (await hass.async_add_executor_job(init_recorder_component, hass))
    (await async_setup_component(hass, 'history', {history.DOMAIN: {history.CONF_ORDER: True}}))
    (await hass.async_add_executor_job(hass.data[recorder.DATA_INSTANCE].block_till_done))
    client = (await hass_client())
    response = (await client.get(f'/api/history/period/{dt_util.utcnow().isoformat()}'))
    assert (response.status == 200)