Skip to content

Commit cc8fcc1

Browse files
authored
CUST-4719 Fixed grants.update() not using PATCH, fixed tests) (#435)
1 parent be711bf commit cc8fcc1

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ nylas-python Changelog
44
Unreleased
55
----------
66
* Added Yahoo, Zoom, EWS as providers to models/auth.py
7+
* Fixed grants.update() not using the correct "PATCH" method
78

89
v6.11.1
910
----------

nylas/resources/grants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def update(
9292
response_type=Grant,
9393
request_body=request_body,
9494
overrides=overrides,
95+
method="PATCH"
9596
)
9697

9798
def destroy(

tests/resources/test_grants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_update_grant(self, http_client_response):
6767
)
6868

6969
http_client_response._execute.assert_called_once_with(
70-
"PUT", "/v3/grants/grant-123", None, None, request_body, overrides=None
70+
"PATCH", "/v3/grants/grant-123", None, None, request_body, overrides=None
7171
)
7272

7373
def test_destroy_grant(self, http_client_delete_response):

0 commit comments

Comments
 (0)