mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Fix intermittently failing decryption error test (#1082)
This commit is contained in:
parent
055bbcc0c9
commit
1c83675e57
@ -1,5 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import re
|
||||||
import secrets
|
import secrets
|
||||||
import time
|
import time
|
||||||
from contextlib import nullcontext as does_not_raise
|
from contextlib import nullcontext as does_not_raise
|
||||||
@ -298,7 +299,7 @@ async def test_transport_decrypt_error(mocker, caplog):
|
|||||||
|
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
KasaException,
|
KasaException,
|
||||||
match="Error trying to decrypt device 127.0.0.1 response: Invalid padding bytes.",
|
match=re.escape("Error trying to decrypt device 127.0.0.1 response:"),
|
||||||
):
|
):
|
||||||
await transport.send(json.dumps({}))
|
await transport.send(json.dumps({}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user