Use IndieAuth for client ID (#15369)
* Use IndieAuth for client ID * Lint * Lint & Fix tests * Allow local IP addresses * Update comment
This commit is contained in:
parent
f7d7d825b0
commit
0d4841cbea
14 changed files with 329 additions and 347 deletions
|
@ -3,7 +3,7 @@ import pytest
|
|||
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import MockUser
|
||||
from tests.common import MockUser, CLIENT_ID
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
@ -28,11 +28,6 @@ def hass_ws_client(aiohttp_client):
|
|||
def hass_access_token(hass):
|
||||
"""Return an access token to access Home Assistant."""
|
||||
user = MockUser().add_to_hass(hass)
|
||||
client = hass.loop.run_until_complete(hass.auth.async_create_client(
|
||||
'Access Token Fixture',
|
||||
redirect_uris=['/'],
|
||||
no_secret=True,
|
||||
))
|
||||
refresh_token = hass.loop.run_until_complete(
|
||||
hass.auth.async_create_refresh_token(user, client))
|
||||
hass.auth.async_create_refresh_token(user, CLIENT_ID))
|
||||
yield hass.auth.async_create_access_token(refresh_token)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue