Use new style for built-in ws commmands (#21694)

* Use new style for built-in ws commmands

* Lint
This commit is contained in:
Paulus Schoutsen 2019-03-05 19:31:26 -08:00 committed by GitHub
parent c9b173405b
commit fc1ee9be43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 82 deletions

View file

@ -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