Use new style for built-in ws commmands (#21694)
* Use new style for built-in ws commmands * Lint
This commit is contained in:
parent
c9b173405b
commit
fc1ee9be43
4 changed files with 55 additions and 82 deletions
|
@ -5,7 +5,7 @@ from unittest.mock import patch, Mock
|
|||
from aiohttp import WSMsgType
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.websocket_api import const, commands, messages
|
||||
from homeassistant.components.websocket_api import const, messages
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
@ -56,7 +56,7 @@ def test_pending_msg_overflow(hass, mock_low_queue, websocket_client):
|
|||
for idx in range(10):
|
||||
yield from websocket_client.send_json({
|
||||
'id': idx + 1,
|
||||
'type': commands.TYPE_PING,
|
||||
'type': 'ping',
|
||||
})
|
||||
msg = yield from websocket_client.receive()
|
||||
assert msg.type == WSMsgType.close
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue