@@ -250,6 +250,7 @@ def invite(
250250 additional_login_ids : Optional [List [str ]] = None ,
251251 sso_app_ids : Optional [List [str ]] = None ,
252252 template_id : str = "" ,
253+ test : bool = False ,
253254 ) -> dict :
254255 """
255256 Create a new user and invite them via an email / text message.
@@ -278,7 +279,7 @@ def invite(
278279 role_names ,
279280 user_tenants ,
280281 True ,
281- False ,
282+ test ,
282283 picture ,
283284 custom_attributes ,
284285 verified_email ,
@@ -346,6 +347,7 @@ def update(
346347 verified_phone : Optional [bool ] = None ,
347348 additional_login_ids : Optional [List [str ]] = None ,
348349 sso_app_ids : Optional [List [str ]] = None ,
350+ test : bool = False ,
349351 ) -> dict :
350352 """
351353 Update an existing user with the given various fields. IMPORTANT: All parameters are used as overrides
@@ -367,6 +369,7 @@ def update(
367369 picture (str): Optional url for user picture
368370 custom_attributes (dict): Optional, set the different custom attributes values of the keys that were previously configured in Descope console app
369371 sso_app_ids (List[str]): Optional, list of SSO applications IDs to be associated with the user.
372+ test (bool, optional): Set to True to update a test user. Defaults to False.
370373
371374 Return value (dict):
372375 Return dict in the format
@@ -391,7 +394,7 @@ def update(
391394 family_name ,
392395 role_names ,
393396 user_tenants ,
394- False ,
397+ test ,
395398 picture ,
396399 custom_attributes ,
397400 verified_email ,
@@ -420,6 +423,7 @@ def patch(
420423 verified_email : Optional [bool ] = None ,
421424 verified_phone : Optional [bool ] = None ,
422425 sso_app_ids : Optional [List [str ]] = None ,
426+ test : bool = False ,
423427 ) -> dict :
424428 """
425429 Patches an existing user with the given various fields. Only the given fields will be used to update the user.
@@ -439,6 +443,7 @@ def patch(
439443 picture (str): Optional url for user picture
440444 custom_attributes (dict): Optional, set the different custom attributes values of the keys that were previously configured in Descope console app
441445 sso_app_ids (List[str]): Optional, list of SSO applications IDs to be associated with the user.
446+ test (bool, optional): Set to True to update a test user. Defaults to False.
442447
443448 Return value (dict):
444449 Return dict in the format
@@ -465,6 +470,7 @@ def patch(
465470 verified_email ,
466471 verified_phone ,
467472 sso_app_ids ,
473+ test ,
468474 ),
469475 pswd = self ._auth .management_key ,
470476 )
@@ -1936,6 +1942,7 @@ def _compose_patch_body(
19361942 verified_email : Optional [bool ],
19371943 verified_phone : Optional [bool ],
19381944 sso_app_ids : Optional [List [str ]],
1945+ test : bool = False ,
19391946 ) -> dict :
19401947 res : dict [str , Any ] = {
19411948 "loginId" : login_id ,
@@ -1966,4 +1973,6 @@ def _compose_patch_body(
19661973 res ["verifiedPhone" ] = verified_phone
19671974 if sso_app_ids is not None :
19681975 res ["ssoAppIds" ] = sso_app_ids
1976+ if test :
1977+ res ["test" ] = test
19691978 return res
0 commit comments