2626
2727
2828class TestAuditLogs :
29- def test_list_organization_audit_logs_retention (self , workos , httpx_mock ):
29+ def test_get_organization_audit_logs_retention (self , workos , httpx_mock ):
3030 httpx_mock .add_response (
3131 json = load_fixture ("audit_logs_retention_json.json" ),
3232 )
33- result = workos .audit_logs .list_organization_audit_logs_retention ("test_id" )
33+ result = workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
3434 assert isinstance (result , AuditLogsRetentionJson )
3535 assert result .retention_period_in_days == 30
3636 request = httpx_mock .get_request ()
@@ -172,38 +172,38 @@ def test_get_export(self, workos, httpx_mock):
172172 assert request .method == "GET"
173173 assert request .url .path .endswith ("/audit_logs/exports/test_auditLogExportId" )
174174
175- def test_list_organization_audit_logs_retention_with_request_options (
175+ def test_get_organization_audit_logs_retention_with_request_options (
176176 self , workos , httpx_mock
177177 ):
178178 httpx_mock .add_response (json = load_fixture ("audit_logs_retention_json.json" ))
179- workos .audit_logs .list_organization_audit_logs_retention (
179+ workos .audit_logs .get_organization_audit_logs_retention (
180180 "test_id" , request_options = {"extra_headers" : {"X-Custom" : "value" }}
181181 )
182182 request = httpx_mock .get_request ()
183183 assert request .headers ["X-Custom" ] == "value"
184184
185- def test_list_organization_audit_logs_retention_unauthorized (
185+ def test_get_organization_audit_logs_retention_unauthorized (
186186 self , workos , httpx_mock
187187 ):
188188 httpx_mock .add_response (
189189 status_code = 401 ,
190190 json = {"message" : "Unauthorized" },
191191 )
192192 with pytest .raises (AuthenticationError ):
193- workos .audit_logs .list_organization_audit_logs_retention ("test_id" )
193+ workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
194194
195- def test_list_organization_audit_logs_retention_not_found (self , httpx_mock ):
195+ def test_get_organization_audit_logs_retention_not_found (self , httpx_mock ):
196196 workos = WorkOSClient (
197197 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
198198 )
199199 try :
200200 httpx_mock .add_response (status_code = 404 , json = {"message" : "Not found" })
201201 with pytest .raises (NotFoundError ):
202- workos .audit_logs .list_organization_audit_logs_retention ("test_id" )
202+ workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
203203 finally :
204204 workos .close ()
205205
206- def test_list_organization_audit_logs_retention_rate_limited (self , httpx_mock ):
206+ def test_get_organization_audit_logs_retention_rate_limited (self , httpx_mock ):
207207 workos = WorkOSClient (
208208 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
209209 )
@@ -214,51 +214,51 @@ def test_list_organization_audit_logs_retention_rate_limited(self, httpx_mock):
214214 json = {"message" : "Slow down" },
215215 )
216216 with pytest .raises (RateLimitExceededError ):
217- workos .audit_logs .list_organization_audit_logs_retention ("test_id" )
217+ workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
218218 finally :
219219 workos .close ()
220220
221- def test_list_organization_audit_logs_retention_server_error (self , httpx_mock ):
221+ def test_get_organization_audit_logs_retention_server_error (self , httpx_mock ):
222222 workos = WorkOSClient (
223223 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
224224 )
225225 try :
226226 httpx_mock .add_response (status_code = 500 , json = {"message" : "Server error" })
227227 with pytest .raises (ServerError ):
228- workos .audit_logs .list_organization_audit_logs_retention ("test_id" )
228+ workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
229229 finally :
230230 workos .close ()
231231
232- def test_list_organization_audit_logs_retention_bad_request (self , httpx_mock ):
232+ def test_get_organization_audit_logs_retention_bad_request (self , httpx_mock ):
233233 workos = WorkOSClient (
234234 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
235235 )
236236 try :
237237 httpx_mock .add_response (status_code = 400 , json = {"message" : "Bad request" })
238238 with pytest .raises (BadRequestError ):
239- workos .audit_logs .list_organization_audit_logs_retention ("test_id" )
239+ workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
240240 finally :
241241 workos .close ()
242242
243- def test_list_organization_audit_logs_retention_unprocessable (self , httpx_mock ):
243+ def test_get_organization_audit_logs_retention_unprocessable (self , httpx_mock ):
244244 workos = WorkOSClient (
245245 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
246246 )
247247 try :
248248 httpx_mock .add_response (status_code = 422 , json = {"message" : "Unprocessable" })
249249 with pytest .raises (UnprocessableEntityError ):
250- workos .audit_logs .list_organization_audit_logs_retention ("test_id" )
250+ workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
251251 finally :
252252 workos .close ()
253253
254254
255255class TestAsyncAuditLogs :
256256 @pytest .mark .asyncio
257- async def test_list_organization_audit_logs_retention (
257+ async def test_get_organization_audit_logs_retention (
258258 self , async_workos , httpx_mock
259259 ):
260260 httpx_mock .add_response (json = load_fixture ("audit_logs_retention_json.json" ))
261- result = await async_workos .audit_logs .list_organization_audit_logs_retention (
261+ result = await async_workos .audit_logs .get_organization_audit_logs_retention (
262262 "test_id"
263263 )
264264 assert isinstance (result , AuditLogsRetentionJson )
@@ -397,44 +397,40 @@ async def test_get_export(self, async_workos, httpx_mock):
397397 assert request .url .path .endswith ("/audit_logs/exports/test_auditLogExportId" )
398398
399399 @pytest .mark .asyncio
400- async def test_list_organization_audit_logs_retention_with_request_options (
400+ async def test_get_organization_audit_logs_retention_with_request_options (
401401 self , async_workos , httpx_mock
402402 ):
403403 httpx_mock .add_response (json = load_fixture ("audit_logs_retention_json.json" ))
404- await async_workos .audit_logs .list_organization_audit_logs_retention (
404+ await async_workos .audit_logs .get_organization_audit_logs_retention (
405405 "test_id" , request_options = {"extra_headers" : {"X-Custom" : "value" }}
406406 )
407407 request = httpx_mock .get_request ()
408408 assert request .headers ["X-Custom" ] == "value"
409409
410410 @pytest .mark .asyncio
411- async def test_list_organization_audit_logs_retention_unauthorized (
411+ async def test_get_organization_audit_logs_retention_unauthorized (
412412 self , async_workos , httpx_mock
413413 ):
414414 httpx_mock .add_response (status_code = 401 , json = {"message" : "Unauthorized" })
415415 with pytest .raises (AuthenticationError ):
416- await async_workos .audit_logs .list_organization_audit_logs_retention (
416+ await async_workos .audit_logs .get_organization_audit_logs_retention (
417417 "test_id"
418418 )
419419
420420 @pytest .mark .asyncio
421- async def test_list_organization_audit_logs_retention_not_found (self , httpx_mock ):
421+ async def test_get_organization_audit_logs_retention_not_found (self , httpx_mock ):
422422 workos = AsyncWorkOSClient (
423423 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
424424 )
425425 try :
426426 httpx_mock .add_response (status_code = 404 , json = {"message" : "Not found" })
427427 with pytest .raises (NotFoundError ):
428- await workos .audit_logs .list_organization_audit_logs_retention (
429- "test_id"
430- )
428+ await workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
431429 finally :
432430 await workos .close ()
433431
434432 @pytest .mark .asyncio
435- async def test_list_organization_audit_logs_retention_rate_limited (
436- self , httpx_mock
437- ):
433+ async def test_get_organization_audit_logs_retention_rate_limited (self , httpx_mock ):
438434 workos = AsyncWorkOSClient (
439435 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
440436 )
@@ -445,44 +441,36 @@ async def test_list_organization_audit_logs_retention_rate_limited(
445441 json = {"message" : "Slow down" },
446442 )
447443 with pytest .raises (RateLimitExceededError ):
448- await workos .audit_logs .list_organization_audit_logs_retention (
449- "test_id"
450- )
444+ await workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
451445 finally :
452446 await workos .close ()
453447
454448 @pytest .mark .asyncio
455- async def test_list_organization_audit_logs_retention_server_error (
456- self , httpx_mock
457- ):
449+ async def test_get_organization_audit_logs_retention_server_error (self , httpx_mock ):
458450 workos = AsyncWorkOSClient (
459451 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
460452 )
461453 try :
462454 httpx_mock .add_response (status_code = 500 , json = {"message" : "Server error" })
463455 with pytest .raises (ServerError ):
464- await workos .audit_logs .list_organization_audit_logs_retention (
465- "test_id"
466- )
456+ await workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
467457 finally :
468458 await workos .close ()
469459
470460 @pytest .mark .asyncio
471- async def test_list_organization_audit_logs_retention_bad_request (self , httpx_mock ):
461+ async def test_get_organization_audit_logs_retention_bad_request (self , httpx_mock ):
472462 workos = AsyncWorkOSClient (
473463 api_key = "sk_test_123" , client_id = "client_test" , max_retries = 0
474464 )
475465 try :
476466 httpx_mock .add_response (status_code = 400 , json = {"message" : "Bad request" })
477467 with pytest .raises (BadRequestError ):
478- await workos .audit_logs .list_organization_audit_logs_retention (
479- "test_id"
480- )
468+ await workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
481469 finally :
482470 await workos .close ()
483471
484472 @pytest .mark .asyncio
485- async def test_list_organization_audit_logs_retention_unprocessable (
473+ async def test_get_organization_audit_logs_retention_unprocessable (
486474 self , httpx_mock
487475 ):
488476 workos = AsyncWorkOSClient (
@@ -491,8 +479,6 @@ async def test_list_organization_audit_logs_retention_unprocessable(
491479 try :
492480 httpx_mock .add_response (status_code = 422 , json = {"message" : "Unprocessable" })
493481 with pytest .raises (UnprocessableEntityError ):
494- await workos .audit_logs .list_organization_audit_logs_retention (
495- "test_id"
496- )
482+ await workos .audit_logs .get_organization_audit_logs_retention ("test_id" )
497483 finally :
498484 await workos .close ()
0 commit comments