Bump deebot-client to 5.2.1 (#110683)

* Bump deebot-client to 5.2.0

* Bumb again

* Fix tests
pull/108081/head
Robert Resch 2024-02-16 11:47:36 +01:00 committed by GitHub
parent 2ac7d11b8d
commit bcce32e2de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 7 deletions

View File

@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/ecovacs", "documentation": "https://www.home-assistant.io/integrations/ecovacs",
"iot_class": "cloud_push", "iot_class": "cloud_push",
"loggers": ["sleekxmppfs", "sucks", "deebot_client"], "loggers": ["sleekxmppfs", "sucks", "deebot_client"],
"requirements": ["py-sucks==0.9.9", "deebot-client==5.1.1"] "requirements": ["py-sucks==0.9.9", "deebot-client==5.2.1"]
} }

View File

@ -696,7 +696,7 @@ debugpy==1.8.1
# decora==0.6 # decora==0.6
# homeassistant.components.ecovacs # homeassistant.components.ecovacs
deebot-client==5.1.1 deebot-client==5.2.1
# homeassistant.components.ihc # homeassistant.components.ihc
# homeassistant.components.namecheapdns # homeassistant.components.namecheapdns

View File

@ -571,7 +571,7 @@ dbus-fast==2.21.1
debugpy==1.8.1 debugpy==1.8.1
# homeassistant.components.ecovacs # homeassistant.components.ecovacs
deebot-client==5.1.1 deebot-client==5.2.1
# homeassistant.components.ihc # homeassistant.components.ihc
# homeassistant.components.namecheapdns # homeassistant.components.namecheapdns

View File

@ -3,7 +3,7 @@ from collections.abc import Generator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
from deebot_client.const import PATH_API_APPSVR_APP from deebot_client import const
from deebot_client.device import Device from deebot_client.device import Device
from deebot_client.exceptions import ApiError from deebot_client.exceptions import ApiError
from deebot_client.models import Credentials from deebot_client.models import Credentials
@ -75,9 +75,13 @@ def mock_authenticator(device_fixture: str) -> Generator[Mock, None, None]:
query_params: dict[str, Any] | None = None, query_params: dict[str, Any] | None = None,
headers: dict[str, Any] | None = None, headers: dict[str, Any] | None = None,
) -> dict[str, Any]: ) -> dict[str, Any]:
if path == PATH_API_APPSVR_APP: match path:
return {"code": 0, "devices": devices, "errno": "0"} case const.PATH_API_APPSVR_APP:
raise ApiError("Path not mocked: {path}") return {"code": 0, "devices": devices, "errno": "0"}
case const.PATH_API_USERS_USER:
return {"todo": "result", "result": "ok", "devices": devices}
case _:
raise ApiError("Path not mocked: {path}")
authenticator.post_authenticated.side_effect = post_authenticated authenticator.post_authenticated.side_effect = post_authenticated
yield authenticator yield authenticator