Use proper signals (#18613)

* Emulated Hue not use deprecated handler

* Remove no longer needed workaround

* Add middleware directly

* Dont always load the ban config file

* Update homeassistant/components/http/ban.py

Co-Authored-By: balloob <paulus@home-assistant.io>

* Update __init__.py
This commit is contained in:
Paulus Schoutsen 2018-11-21 20:55:21 +01:00 committed by GitHub
parent 5b3e9399a9
commit 1341ecd2eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 45 deletions

View file

@ -9,7 +9,15 @@ from homeassistant.components.websocket_api.http import URL
from homeassistant.components.websocket_api.auth import (
TYPE_AUTH, TYPE_AUTH_OK, TYPE_AUTH_REQUIRED)
from tests.common import MockUser, CLIENT_ID
from tests.common import MockUser, CLIENT_ID, mock_coro
@pytest.fixture(autouse=True)
def prevent_io():
"""Fixture to prevent certain I/O from happening."""
with patch('homeassistant.components.http.ban.async_load_ip_bans_config',
side_effect=lambda *args: mock_coro([])):
yield
@pytest.fixture