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
|
@ -56,7 +56,7 @@ SENSOR_OUTPUT = {
|
|||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_client(hass, aiohttp_client):
|
||||
def mock_client(hass, hass_client):
|
||||
"""Start the Home Assistant HTTP component."""
|
||||
with patch('homeassistant.components.spaceapi',
|
||||
return_value=mock_coro(True)):
|
||||
|
@ -70,7 +70,7 @@ def mock_client(hass, aiohttp_client):
|
|||
hass.states.async_set('test.hum1', 88,
|
||||
attributes={'unit_of_measurement': '%'})
|
||||
|
||||
return hass.loop.run_until_complete(aiohttp_client(hass.http.app))
|
||||
return hass.loop.run_until_complete(hass_client())
|
||||
|
||||
|
||||
async def test_spaceapi_get(hass, mock_client):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue