mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-21 06:48:05 +00:00
Avoid reset for all connection errors
This commit is contained in:
@@ -7,7 +7,6 @@ import pytest
|
||||
from ..deviceconfig import DeviceConfig
|
||||
from ..exceptions import (
|
||||
ConnectionException,
|
||||
DisconnectedException,
|
||||
SmartDeviceException,
|
||||
TimeoutException,
|
||||
)
|
||||
@@ -19,13 +18,13 @@ from ..httpclient import HttpClient
|
||||
[
|
||||
(
|
||||
aiohttp.ServerDisconnectedError(),
|
||||
DisconnectedException,
|
||||
"Disconnected from the device: ",
|
||||
ConnectionException,
|
||||
"Device connection error: ",
|
||||
),
|
||||
(
|
||||
aiohttp.ClientOSError(),
|
||||
ConnectionException,
|
||||
"Unable to connect to the device: ",
|
||||
"Device connection error: ",
|
||||
),
|
||||
(
|
||||
aiohttp.ServerTimeoutError(),
|
||||
|
@@ -57,7 +57,7 @@ class _mock_response:
|
||||
(aiohttp.ServerDisconnectedError("dummy exception"), True),
|
||||
(aiohttp.ClientOSError("dummy exception"), True),
|
||||
],
|
||||
ids=("Exception", "SmartDeviceException", "DisconnectError", "ConnectError"),
|
||||
ids=("Exception", "ServerTimeoutError", "ServerDisconnectedError", "ClientOSError"),
|
||||
)
|
||||
@pytest.mark.parametrize("transport_class", [AesTransport, KlapTransport])
|
||||
@pytest.mark.parametrize("protocol_class", [IotProtocol, SmartProtocol])
|
||||
|
Reference in New Issue
Block a user