Remove websocket_api send_big_result (#75452)
This commit is contained in:
parent
51ed9ee59d
commit
d989e4373d
8 changed files with 27 additions and 201 deletions
|
@ -7,30 +7,10 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant import exceptions
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.components.websocket_api import const
|
||||
|
||||
from tests.common import MockUser
|
||||
|
||||
|
||||
async def test_send_big_result(hass, websocket_client):
|
||||
"""Test sending big results over the WS."""
|
||||
|
||||
@websocket_api.websocket_command({"type": "big_result"})
|
||||
@websocket_api.async_response
|
||||
def send_big_result(hass, connection, msg):
|
||||
connection.send_big_result(msg["id"], {"big": "result"})
|
||||
|
||||
websocket_api.async_register_command(hass, send_big_result)
|
||||
|
||||
await websocket_client.send_json({"id": 5, "type": "big_result"})
|
||||
|
||||
msg = await websocket_client.receive_json()
|
||||
assert msg["id"] == 5
|
||||
assert msg["type"] == const.TYPE_RESULT
|
||||
assert msg["success"]
|
||||
assert msg["result"] == {"big": "result"}
|
||||
|
||||
|
||||
async def test_exception_handling():
|
||||
"""Test handling of exceptions."""
|
||||
send_messages = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue