Legacy api fix (#18733)
* Set user for API password requests * Fix tests * Fix typing
This commit is contained in:
parent
9d7b1fc3a7
commit
c2f8dfcb9f
15 changed files with 148 additions and 74 deletions
|
@ -515,13 +515,13 @@ class TestComponentHistory(unittest.TestCase):
|
|||
return zero, four, states
|
||||
|
||||
|
||||
async def test_fetch_period_api(hass, aiohttp_client):
|
||||
async def test_fetch_period_api(hass, hass_client):
|
||||
"""Test the fetch period view for history."""
|
||||
await hass.async_add_job(init_recorder_component, hass)
|
||||
await async_setup_component(hass, 'history', {})
|
||||
await hass.components.recorder.wait_connection_ready()
|
||||
await hass.async_add_job(hass.data[recorder.DATA_INSTANCE].block_till_done)
|
||||
client = await aiohttp_client(hass.http.app)
|
||||
client = await hass_client()
|
||||
response = await client.get(
|
||||
'/api/history/period/{}'.format(dt_util.utcnow().isoformat()))
|
||||
assert response.status == 200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue