mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-14 20:18:29 +00:00
Add autouse fixture to patch asyncio.sleep (#1131)
This commit is contained in:
@@ -66,8 +66,6 @@ async def test_protocol_retries_via_client_session(
|
||||
):
|
||||
host = "127.0.0.1"
|
||||
conn = mocker.patch.object(aiohttp.ClientSession, "post", side_effect=error)
|
||||
mocker.patch.object(protocol_class, "BACKOFF_SECONDS_AFTER_TIMEOUT", 0)
|
||||
mocker.patch("asyncio.sleep")
|
||||
|
||||
config = DeviceConfig(host)
|
||||
with pytest.raises(KasaException):
|
||||
@@ -140,7 +138,6 @@ async def test_protocol_retry_recoverable_error(
|
||||
"post",
|
||||
side_effect=aiohttp.ClientOSError("foo"),
|
||||
)
|
||||
mocker.patch("asyncio.sleep")
|
||||
|
||||
config = DeviceConfig(host)
|
||||
with pytest.raises(KasaException):
|
||||
|
||||
Reference in New Issue
Block a user