Remove direct authentication via trusted networks or API password (#27656)
* Remove direct authentication via trusted networks and API password * Fix tests
This commit is contained in:
parent
97478d1ef4
commit
3231e22ddf
33 changed files with 114 additions and 423 deletions
|
@ -3,10 +3,12 @@
|
|||
from homeassistant.bootstrap import async_setup_component
|
||||
|
||||
from tests.common import assert_setup_component
|
||||
from .test_auth import test_auth_via_msg
|
||||
from .test_auth import test_auth_active_with_token
|
||||
|
||||
|
||||
async def test_websocket_api(hass, no_auth_websocket_client, legacy_auth):
|
||||
async def test_websocket_api(
|
||||
hass, no_auth_websocket_client, hass_access_token, legacy_auth
|
||||
):
|
||||
"""Test API streams."""
|
||||
with assert_setup_component(1):
|
||||
await async_setup_component(
|
||||
|
@ -16,7 +18,7 @@ async def test_websocket_api(hass, no_auth_websocket_client, legacy_auth):
|
|||
state = hass.states.get("sensor.connected_clients")
|
||||
assert state.state == "0"
|
||||
|
||||
await test_auth_via_msg(no_auth_websocket_client, legacy_auth)
|
||||
await test_auth_active_with_token(hass, no_auth_websocket_client, hass_access_token)
|
||||
|
||||
state = hass.states.get("sensor.connected_clients")
|
||||
assert state.state == "1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue