mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
Ignore logging events in zha websocket tests (#113031)
This commit is contained in:
parent
fad5fc5256
commit
7ea79148ba
@ -704,7 +704,13 @@ async def test_ws_permit_with_qr_code(
|
|||||||
{ID: 14, TYPE: f"{DOMAIN}/devices/{SERVICE_PERMIT}", **params}
|
{ID: 14, TYPE: f"{DOMAIN}/devices/{SERVICE_PERMIT}", **params}
|
||||||
)
|
)
|
||||||
|
|
||||||
msg = await zha_client.receive_json()
|
msg_type = None
|
||||||
|
while msg_type != const.TYPE_RESULT:
|
||||||
|
# There will be logging events coming over the websocket
|
||||||
|
# as well so we want to ignore those
|
||||||
|
msg = await zha_client.receive_json()
|
||||||
|
msg_type = msg["type"]
|
||||||
|
|
||||||
assert msg["id"] == 14
|
assert msg["id"] == 14
|
||||||
assert msg["type"] == const.TYPE_RESULT
|
assert msg["type"] == const.TYPE_RESULT
|
||||||
assert msg["success"]
|
assert msg["success"]
|
||||||
@ -761,7 +767,13 @@ async def test_ws_permit_ha12(
|
|||||||
{ID: 14, TYPE: f"{DOMAIN}/devices/{SERVICE_PERMIT}", **params}
|
{ID: 14, TYPE: f"{DOMAIN}/devices/{SERVICE_PERMIT}", **params}
|
||||||
)
|
)
|
||||||
|
|
||||||
msg = await zha_client.receive_json()
|
msg_type = None
|
||||||
|
while msg_type != const.TYPE_RESULT:
|
||||||
|
# There will be logging events coming over the websocket
|
||||||
|
# as well so we want to ignore those
|
||||||
|
msg = await zha_client.receive_json()
|
||||||
|
msg_type = msg["type"]
|
||||||
|
|
||||||
assert msg["id"] == 14
|
assert msg["id"] == 14
|
||||||
assert msg["type"] == const.TYPE_RESULT
|
assert msg["type"] == const.TYPE_RESULT
|
||||||
assert msg["success"]
|
assert msg["success"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user