mirror of
https://github.com/home-assistant/core.git
synced 2025-10-16 23:29:30 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user