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:
Paulus Schoutsen 2018-07-09 18:24:46 +02:00 committed by GitHub
parent f7d7d825b0
commit 0d4841cbea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 329 additions and 347 deletions

View file

@ -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)