Ignore logging events in zha websocket tests (#113031)
This commit is contained in:
parent
fad5fc5256
commit
7ea79148ba
1 changed files with 14 additions and 2 deletions
|
@ -704,7 +704,13 @@ async def test_ws_permit_with_qr_code(
|
|||
{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["type"] == const.TYPE_RESULT
|
||||
assert msg["success"]
|
||||
|
@ -761,7 +767,13 @@ async def test_ws_permit_ha12(
|
|||
{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["type"] == const.TYPE_RESULT
|
||||
assert msg["success"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue