File tree Expand file tree Collapse file tree 2 files changed +29
-9
lines changed
Expand file tree Collapse file tree 2 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 44from pydantic import TypeAdapter
55from typing_extensions import TypedDict
66
7-
8- class _Unset (Enum ):
9- """Sentinel to distinguish 'not provided' from an explicit None."""
10-
11- TOKEN = 0
12-
13-
14- UNSET : _Unset = _Unset .TOKEN
15-
167from workos .types .authorization .environment_role import (
178 EnvironmentRole ,
189 EnvironmentRoleList ,
@@ -39,6 +30,13 @@ class _Unset(Enum):
3930 REQUEST_METHOD_PUT ,
4031)
4132
33+ class _Unset (Enum ):
34+
35+ TOKEN = 0
36+
37+
38+ UNSET : _Unset = _Unset .TOKEN
39+
4240AUTHORIZATION_PERMISSIONS_PATH = "authorization/permissions"
4341AUTHORIZATION_RESOURCES_PATH = "authorization/resources"
4442
Original file line number Diff line number Diff line change @@ -204,6 +204,28 @@ def test_update_resource_without_meta(
204204 assert request_kwargs ["method" ] == "patch"
205205 assert request_kwargs ["json" ] == {}
206206
207+
208+ def test_update_resource_without_desc (
209+ self , mock_resource , capture_and_mock_http_client_request
210+ ):
211+ request_kwargs = capture_and_mock_http_client_request (
212+ self .http_client , mock_resource , 200
213+ )
214+
215+ resource = syncify (
216+ self .authorization .update_resource (
217+ "res_01ABC" ,
218+ name = "Updated Name" ,
219+ )
220+ )
221+
222+ assert resource .id == "res_01ABC"
223+ assert request_kwargs ["method" ] == "patch"
224+ assert request_kwargs ["url" ].endswith ("/authorization/resources/res_01ABC" )
225+ assert request_kwargs ["json" ] == {
226+ "name" : "Updated Name"
227+ }
228+
207229 # --- delete_resource ---
208230
209231 def test_delete_resource_without_cascade (
You can’t perform that action at this time.
0 commit comments