Fix memory leaks in websocket api (#94780)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
a7d327afa2
commit
1206f2c1da
5 changed files with 244 additions and 84 deletions
|
@ -3,11 +3,19 @@ import pytest
|
|||
|
||||
from homeassistant.components.websocket_api.auth import TYPE_AUTH_REQUIRED
|
||||
from homeassistant.components.websocket_api.http import URL
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.typing import (
|
||||
MockHAClientWebSocket,
|
||||
WebSocketGenerator,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def websocket_client(hass, hass_ws_client):
|
||||
async def websocket_client(
|
||||
hass: HomeAssistant, hass_ws_client: WebSocketGenerator
|
||||
) -> MockHAClientWebSocket:
|
||||
"""Create a websocket client."""
|
||||
return await hass_ws_client(hass)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue