Skip to content

Commit

Permalink
icloudpy version bump to 0.7.0 (#277)
Browse files Browse the repository at this point in the history
* icloudpy version bump to 0.7.0

* Fixes for failing tests

* Update requirements.txt
  • Loading branch information
mandarons authored Dec 7, 2024
1 parent d5d7660 commit b005acd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
icloudpy==0.6.0
icloudpy==0.7.0
ruamel.yaml==0.18.6
python-magic==0.4.27
requests~=2.28.1
requests~=2.32.3
14 changes: 13 additions & 1 deletion tests/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@
# Data
AUTH_OK = {"authType": "hsa2"}

SRP_INIT_OK = {
"iteration": 20433,
"salt": "0samK84bcBmkVsswOpZbZg==",
"protocol": "s2k",
"b": "STVHcWTN9YOYn4IgtIJ6UPdPbvzvL+zza/l+6yUHUtdEyxwzpB78y8wqZ8QWSbVqjBcpl32iEA4T3nYp0LWZ5hD3r3yIJFloXvX0kpBJkr\
+Nh8EfHuW1V50A8riH6VWyuJ8m3JmOO7/xkNgP7je8GMpt/5f/7qE3AOj73e3JR0fzQ7IopdU0tlyVX0tD7T6wCyHS52GJWDdq1I2bgzurIK2\
/ZjR/Hwzd/67oFQPtKQgjrSRaKo5MJEfDP7C9wOlXsZqbb7igX6PeZRWrfl+iQFaA/FVeWSngB07ja3wOryY9GsYO06ELGOaQ+MpsT7mouqrGT\
fOJ0OMh9EgrkJEM6w==",
"c": "e-1be-8746c235-b41c-11ef-bd17-c780acb4fe15:PRN",
}
ZONES_LIST_WORKING = {
"zones": [
{
Expand Down Expand Up @@ -3744,8 +3754,10 @@ def request(self, method, url, **kwargs):

if self.service.auth_endpoint in url:
if "signin" in url and method == "POST":
if data.get("accountName") not in VALID_USERS or data.get("password") != VALID_PASSWORD:
if data.get("accountName") not in VALID_USERS:
self._raise_error(None, "Unknown reason")
if url.endswith("/init"):
return ResponseMock(SRP_INIT_OK)
if data.get("accountName") == REQUIRES_2FA_USER:
self.service.session_data["session_token"] = REQUIRES_2FA_TOKEN
return ResponseMock(AUTH_OK)
Expand Down

0 comments on commit b005acd

Please sign in to comment.