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
|
@ -5,8 +5,6 @@ from homeassistant.setup import async_setup_component
|
|||
from homeassistant.components.websocket_api.http import URL
|
||||
from homeassistant.components.websocket_api.auth import TYPE_AUTH_REQUIRED
|
||||
|
||||
from . import API_PASSWORD
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def websocket_client(hass, hass_ws_client, hass_access_token):
|
||||
|
@ -17,11 +15,7 @@ def websocket_client(hass, hass_ws_client, hass_access_token):
|
|||
@pytest.fixture
|
||||
def no_auth_websocket_client(hass, loop, aiohttp_client):
|
||||
"""Websocket connection that requires authentication."""
|
||||
assert loop.run_until_complete(
|
||||
async_setup_component(
|
||||
hass, "websocket_api", {"http": {"api_password": API_PASSWORD}}
|
||||
)
|
||||
)
|
||||
assert loop.run_until_complete(async_setup_component(hass, "websocket_api", {}))
|
||||
|
||||
client = loop.run_until_complete(aiohttp_client(hass.http.app))
|
||||
ws = loop.run_until_complete(client.ws_connect(URL))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue