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:
parent
5b3e9399a9
commit
1341ecd2eb
7 changed files with 43 additions and 45 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue