Enforce permissions for Websocket API (#18719)

* Handle unauth exceptions in websocket

* Enforce permissions in websocket API
This commit is contained in:
Paulus Schoutsen 2018-11-27 10:12:31 +01:00 committed by GitHub
parent 7248c9cb0e
commit 9d7b1fc3a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 17 deletions

View file

@ -9,9 +9,10 @@ from . import API_PASSWORD
@pytest.fixture
def websocket_client(hass, hass_ws_client):
def websocket_client(hass, hass_ws_client, hass_access_token):
"""Create a websocket client."""
return hass.loop.run_until_complete(hass_ws_client(hass))
return hass.loop.run_until_complete(
hass_ws_client(hass, hass_access_token))
@pytest.fixture