Skip to content

Commit

Permalink
Bump deebot-client to 5.2.1 (#110683)
Browse files Browse the repository at this point in the history
* Bump deebot-client to 5.2.0

* Bumb again

* Fix tests
  • Loading branch information
edenhaus authored Feb 16, 2024
1 parent 2ac7d11 commit bcce32e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/ecovacs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/ecovacs",
"iot_class": "cloud_push",
"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"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ debugpy==1.8.1
# decora==0.6

# homeassistant.components.ecovacs
deebot-client==5.1.1
deebot-client==5.2.1

# homeassistant.components.ihc
# homeassistant.components.namecheapdns
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ dbus-fast==2.21.1
debugpy==1.8.1

# homeassistant.components.ecovacs
deebot-client==5.1.1
deebot-client==5.2.1

# homeassistant.components.ihc
# homeassistant.components.namecheapdns
Expand Down
12 changes: 8 additions & 4 deletions tests/components/ecovacs/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any
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.exceptions import ApiError
from deebot_client.models import Credentials
Expand Down Expand Up @@ -75,9 +75,13 @@ async def post_authenticated(
query_params: dict[str, Any] | None = None,
headers: dict[str, Any] | None = None,
) -> dict[str, Any]:
if path == PATH_API_APPSVR_APP:
return {"code": 0, "devices": devices, "errno": "0"}
raise ApiError("Path not mocked: {path}")
match path:
case const.PATH_API_APPSVR_APP:
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
yield authenticator
Expand Down

0 comments on commit bcce32e

Please sign in to comment.