Foundation for users (#13968)

* Add initial user foundation to Home Assistant

* Address comments

* Address comments

* Allow non-ascii passwords

* One more utf-8 hmac compare digest

* Add new line
This commit is contained in:
Paulus Schoutsen 2018-05-01 12:20:41 -04:00 committed by Pascal Vizeli
parent b994c10d7f
commit cdd45e7878
22 changed files with 1774 additions and 59 deletions

View file

@ -1,4 +1,6 @@
"""The tests for the Home Assistant HTTP component."""
import logging
from homeassistant.setup import async_setup_component
import homeassistant.components.http as http
@ -76,14 +78,13 @@ async def test_api_no_base_url(hass):
async def test_not_log_password(hass, aiohttp_client, caplog):
"""Test access with password doesn't get logged."""
result = await async_setup_component(hass, 'api', {
assert await async_setup_component(hass, 'api', {
'http': {
http.CONF_API_PASSWORD: 'some-pass'
}
})
assert result
client = await aiohttp_client(hass.http.app)
logging.getLogger('aiohttp.access').setLevel(logging.INFO)
resp = await client.get('/api/', params={
'api_password': 'some-pass'