Debian Codegraph @

tests/api_resources/beta/organization/workspaces/test_service_accounts.py

raw
1 from __future__ import annotations
2
3 import os
4 from typing import Any, cast
5
6 import pytest
7
8 from anthropic import Anthropic, AsyncAnthropic
9 from tests.utils import assert_matches_type
10 from anthropic.pagination import SyncPageCursor, AsyncPageCursor
11 from anthropic.types.beta.organization import BetaServiceAccountWorkspaceMember
12 from anthropic.types.beta.organization.workspaces import (
13 ServiceAccountRemoveResponse,
14 )
15
16 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
17
18
19 class TestServiceAccounts:
20 parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
21
22 @parametrize
23 def test_method_retrieve(self, client: Anthropic) -> None:
24 service_account = client.beta.organization.workspaces.service_accounts.retrieve(
25 service_account_id="service_account_id",
26 workspace_id="workspace_id",
27 )
28 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
29
30 @parametrize
31 def test_method_retrieve_with_all_params(self, client: Anthropic) -> None:
32 service_account = client.beta.organization.workspaces.service_accounts.retrieve(
33 service_account_id="service_account_id",
34 workspace_id="workspace_id",
35 betas=["message-batches-2024-09-24"],
36 )
37 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
38
39 @parametrize
40 def test_raw_response_retrieve(self, client: Anthropic) -> None:
41 response = client.beta.organization.workspaces.service_accounts.with_raw_response.retrieve(
42 service_account_id="service_account_id",
43 workspace_id="workspace_id",
44 )
45
46 assert response.is_closed is True
47 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
48 service_account = response.parse()
49 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
50
51 @parametrize
52 def test_streaming_response_retrieve(self, client: Anthropic) -> None:
53 with client.beta.organization.workspaces.service_accounts.with_streaming_response.retrieve(
54 service_account_id="service_account_id",
55 workspace_id="workspace_id",
56 ) as response:
57 assert not response.is_closed
58 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
59
60 service_account = response.parse()
61 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
62
63 assert cast(Any, response.is_closed) is True
64
65 @parametrize
66 def test_path_params_retrieve(self, client: Anthropic) -> None:
67 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
68 client.beta.organization.workspaces.service_accounts.with_raw_response.retrieve(
69 service_account_id="service_account_id",
70 workspace_id="",
71 )
72
73 with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_account_id` but received ''"):
74 client.beta.organization.workspaces.service_accounts.with_raw_response.retrieve(
75 service_account_id="",
76 workspace_id="workspace_id",
77 )
78
79 @parametrize
80 def test_method_update(self, client: Anthropic) -> None:
81 service_account = client.beta.organization.workspaces.service_accounts.update(
82 service_account_id="service_account_id",
83 workspace_id="workspace_id",
84 workspace_role="workspace_admin",
85 )
86 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
87
88 @parametrize
89 def test_method_update_with_all_params(self, client: Anthropic) -> None:
90 service_account = client.beta.organization.workspaces.service_accounts.update(
91 service_account_id="service_account_id",
92 workspace_id="workspace_id",
93 workspace_role="workspace_admin",
94 betas=["message-batches-2024-09-24"],
95 )
96 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
97
98 @parametrize
99 def test_raw_response_update(self, client: Anthropic) -> None:
100 response = client.beta.organization.workspaces.service_accounts.with_raw_response.update(
101 service_account_id="service_account_id",
102 workspace_id="workspace_id",
103 workspace_role="workspace_admin",
104 )
105
106 assert response.is_closed is True
107 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
108 service_account = response.parse()
109 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
110
111 @parametrize
112 def test_streaming_response_update(self, client: Anthropic) -> None:
113 with client.beta.organization.workspaces.service_accounts.with_streaming_response.update(
114 service_account_id="service_account_id",
115 workspace_id="workspace_id",
116 workspace_role="workspace_admin",
117 ) as response:
118 assert not response.is_closed
119 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
120
121 service_account = response.parse()
122 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
123
124 assert cast(Any, response.is_closed) is True
125
126 @parametrize
127 def test_path_params_update(self, client: Anthropic) -> None:
128 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
129 client.beta.organization.workspaces.service_accounts.with_raw_response.update(
130 service_account_id="service_account_id",
131 workspace_id="",
132 workspace_role="workspace_admin",
133 )
134
135 with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_account_id` but received ''"):
136 client.beta.organization.workspaces.service_accounts.with_raw_response.update(
137 service_account_id="",
138 workspace_id="workspace_id",
139 workspace_role="workspace_admin",
140 )
141
142 @parametrize
143 def test_method_list(self, client: Anthropic) -> None:
144 service_account = client.beta.organization.workspaces.service_accounts.list(
145 workspace_id="workspace_id",
146 )
147 assert_matches_type(SyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
148
149 @parametrize
150 def test_method_list_with_all_params(self, client: Anthropic) -> None:
151 service_account = client.beta.organization.workspaces.service_accounts.list(
152 workspace_id="workspace_id",
153 limit=1,
154 page="page",
155 betas=["message-batches-2024-09-24"],
156 )
157 assert_matches_type(SyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
158
159 @parametrize
160 def test_raw_response_list(self, client: Anthropic) -> None:
161 response = client.beta.organization.workspaces.service_accounts.with_raw_response.list(
162 workspace_id="workspace_id",
163 )
164
165 assert response.is_closed is True
166 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
167 service_account = response.parse()
168 assert_matches_type(SyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
169
170 @parametrize
171 def test_streaming_response_list(self, client: Anthropic) -> None:
172 with client.beta.organization.workspaces.service_accounts.with_streaming_response.list(
173 workspace_id="workspace_id",
174 ) as response:
175 assert not response.is_closed
176 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
177
178 service_account = response.parse()
179 assert_matches_type(SyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
180
181 assert cast(Any, response.is_closed) is True
182
183 @parametrize
184 def test_path_params_list(self, client: Anthropic) -> None:
185 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
186 client.beta.organization.workspaces.service_accounts.with_raw_response.list(
187 workspace_id="",
188 )
189
190 @parametrize
191 def test_method_add(self, client: Anthropic) -> None:
192 service_account = client.beta.organization.workspaces.service_accounts.add(
193 workspace_id="workspace_id",
194 service_account_id="service_account_id",
195 workspace_role="workspace_admin",
196 )
197 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
198
199 @parametrize
200 def test_method_add_with_all_params(self, client: Anthropic) -> None:
201 service_account = client.beta.organization.workspaces.service_accounts.add(
202 workspace_id="workspace_id",
203 service_account_id="service_account_id",
204 workspace_role="workspace_admin",
205 betas=["message-batches-2024-09-24"],
206 )
207 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
208
209 @parametrize
210 def test_raw_response_add(self, client: Anthropic) -> None:
211 response = client.beta.organization.workspaces.service_accounts.with_raw_response.add(
212 workspace_id="workspace_id",
213 service_account_id="service_account_id",
214 workspace_role="workspace_admin",
215 )
216
217 assert response.is_closed is True
218 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
219 service_account = response.parse()
220 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
221
222 @parametrize
223 def test_streaming_response_add(self, client: Anthropic) -> None:
224 with client.beta.organization.workspaces.service_accounts.with_streaming_response.add(
225 workspace_id="workspace_id",
226 service_account_id="service_account_id",
227 workspace_role="workspace_admin",
228 ) as response:
229 assert not response.is_closed
230 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
231
232 service_account = response.parse()
233 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
234
235 assert cast(Any, response.is_closed) is True
236
237 @parametrize
238 def test_path_params_add(self, client: Anthropic) -> None:
239 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
240 client.beta.organization.workspaces.service_accounts.with_raw_response.add(
241 workspace_id="",
242 service_account_id="service_account_id",
243 workspace_role="workspace_admin",
244 )
245
246 @parametrize
247 def test_method_remove(self, client: Anthropic) -> None:
248 service_account = client.beta.organization.workspaces.service_accounts.remove(
249 service_account_id="service_account_id",
250 workspace_id="workspace_id",
251 )
252 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
253
254 @parametrize
255 def test_method_remove_with_all_params(self, client: Anthropic) -> None:
256 service_account = client.beta.organization.workspaces.service_accounts.remove(
257 service_account_id="service_account_id",
258 workspace_id="workspace_id",
259 betas=["message-batches-2024-09-24"],
260 )
261 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
262
263 @parametrize
264 def test_raw_response_remove(self, client: Anthropic) -> None:
265 response = client.beta.organization.workspaces.service_accounts.with_raw_response.remove(
266 service_account_id="service_account_id",
267 workspace_id="workspace_id",
268 )
269
270 assert response.is_closed is True
271 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
272 service_account = response.parse()
273 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
274
275 @parametrize
276 def test_streaming_response_remove(self, client: Anthropic) -> None:
277 with client.beta.organization.workspaces.service_accounts.with_streaming_response.remove(
278 service_account_id="service_account_id",
279 workspace_id="workspace_id",
280 ) as response:
281 assert not response.is_closed
282 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
283
284 service_account = response.parse()
285 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
286
287 assert cast(Any, response.is_closed) is True
288
289 @parametrize
290 def test_path_params_remove(self, client: Anthropic) -> None:
291 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
292 client.beta.organization.workspaces.service_accounts.with_raw_response.remove(
293 service_account_id="service_account_id",
294 workspace_id="",
295 )
296
297 with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_account_id` but received ''"):
298 client.beta.organization.workspaces.service_accounts.with_raw_response.remove(
299 service_account_id="",
300 workspace_id="workspace_id",
301 )
302
303
304 class TestAsyncServiceAccounts:
305 parametrize = pytest.mark.parametrize(
306 "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
307 )
308
309 @parametrize
310 async def test_method_retrieve(self, async_client: AsyncAnthropic) -> None:
311 service_account = await async_client.beta.organization.workspaces.service_accounts.retrieve(
312 service_account_id="service_account_id",
313 workspace_id="workspace_id",
314 )
315 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
316
317 @parametrize
318 async def test_method_retrieve_with_all_params(self, async_client: AsyncAnthropic) -> None:
319 service_account = await async_client.beta.organization.workspaces.service_accounts.retrieve(
320 service_account_id="service_account_id",
321 workspace_id="workspace_id",
322 betas=["message-batches-2024-09-24"],
323 )
324 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
325
326 @parametrize
327 async def test_raw_response_retrieve(self, async_client: AsyncAnthropic) -> None:
328 response = await async_client.beta.organization.workspaces.service_accounts.with_raw_response.retrieve(
329 service_account_id="service_account_id",
330 workspace_id="workspace_id",
331 )
332
333 assert response.is_closed is True
334 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
335 service_account = await response.parse()
336 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
337
338 @parametrize
339 async def test_streaming_response_retrieve(self, async_client: AsyncAnthropic) -> None:
340 async with async_client.beta.organization.workspaces.service_accounts.with_streaming_response.retrieve(
341 service_account_id="service_account_id",
342 workspace_id="workspace_id",
343 ) as response:
344 assert not response.is_closed
345 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
346
347 service_account = await response.parse()
348 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
349
350 assert cast(Any, response.is_closed) is True
351
352 @parametrize
353 async def test_path_params_retrieve(self, async_client: AsyncAnthropic) -> None:
354 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
355 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.retrieve(
356 service_account_id="service_account_id",
357 workspace_id="",
358 )
359
360 with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_account_id` but received ''"):
361 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.retrieve(
362 service_account_id="",
363 workspace_id="workspace_id",
364 )
365
366 @parametrize
367 async def test_method_update(self, async_client: AsyncAnthropic) -> None:
368 service_account = await async_client.beta.organization.workspaces.service_accounts.update(
369 service_account_id="service_account_id",
370 workspace_id="workspace_id",
371 workspace_role="workspace_admin",
372 )
373 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
374
375 @parametrize
376 async def test_method_update_with_all_params(self, async_client: AsyncAnthropic) -> None:
377 service_account = await async_client.beta.organization.workspaces.service_accounts.update(
378 service_account_id="service_account_id",
379 workspace_id="workspace_id",
380 workspace_role="workspace_admin",
381 betas=["message-batches-2024-09-24"],
382 )
383 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
384
385 @parametrize
386 async def test_raw_response_update(self, async_client: AsyncAnthropic) -> None:
387 response = await async_client.beta.organization.workspaces.service_accounts.with_raw_response.update(
388 service_account_id="service_account_id",
389 workspace_id="workspace_id",
390 workspace_role="workspace_admin",
391 )
392
393 assert response.is_closed is True
394 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
395 service_account = await response.parse()
396 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
397
398 @parametrize
399 async def test_streaming_response_update(self, async_client: AsyncAnthropic) -> None:
400 async with async_client.beta.organization.workspaces.service_accounts.with_streaming_response.update(
401 service_account_id="service_account_id",
402 workspace_id="workspace_id",
403 workspace_role="workspace_admin",
404 ) as response:
405 assert not response.is_closed
406 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
407
408 service_account = await response.parse()
409 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
410
411 assert cast(Any, response.is_closed) is True
412
413 @parametrize
414 async def test_path_params_update(self, async_client: AsyncAnthropic) -> None:
415 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
416 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.update(
417 service_account_id="service_account_id",
418 workspace_id="",
419 workspace_role="workspace_admin",
420 )
421
422 with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_account_id` but received ''"):
423 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.update(
424 service_account_id="",
425 workspace_id="workspace_id",
426 workspace_role="workspace_admin",
427 )
428
429 @parametrize
430 async def test_method_list(self, async_client: AsyncAnthropic) -> None:
431 service_account = await async_client.beta.organization.workspaces.service_accounts.list(
432 workspace_id="workspace_id",
433 )
434 assert_matches_type(AsyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
435
436 @parametrize
437 async def test_method_list_with_all_params(self, async_client: AsyncAnthropic) -> None:
438 service_account = await async_client.beta.organization.workspaces.service_accounts.list(
439 workspace_id="workspace_id",
440 limit=1,
441 page="page",
442 betas=["message-batches-2024-09-24"],
443 )
444 assert_matches_type(AsyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
445
446 @parametrize
447 async def test_raw_response_list(self, async_client: AsyncAnthropic) -> None:
448 response = await async_client.beta.organization.workspaces.service_accounts.with_raw_response.list(
449 workspace_id="workspace_id",
450 )
451
452 assert response.is_closed is True
453 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
454 service_account = await response.parse()
455 assert_matches_type(AsyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
456
457 @parametrize
458 async def test_streaming_response_list(self, async_client: AsyncAnthropic) -> None:
459 async with async_client.beta.organization.workspaces.service_accounts.with_streaming_response.list(
460 workspace_id="workspace_id",
461 ) as response:
462 assert not response.is_closed
463 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
464
465 service_account = await response.parse()
466 assert_matches_type(AsyncPageCursor[BetaServiceAccountWorkspaceMember], service_account, path=["response"])
467
468 assert cast(Any, response.is_closed) is True
469
470 @parametrize
471 async def test_path_params_list(self, async_client: AsyncAnthropic) -> None:
472 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
473 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.list(
474 workspace_id="",
475 )
476
477 @parametrize
478 async def test_method_add(self, async_client: AsyncAnthropic) -> None:
479 service_account = await async_client.beta.organization.workspaces.service_accounts.add(
480 workspace_id="workspace_id",
481 service_account_id="service_account_id",
482 workspace_role="workspace_admin",
483 )
484 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
485
486 @parametrize
487 async def test_method_add_with_all_params(self, async_client: AsyncAnthropic) -> None:
488 service_account = await async_client.beta.organization.workspaces.service_accounts.add(
489 workspace_id="workspace_id",
490 service_account_id="service_account_id",
491 workspace_role="workspace_admin",
492 betas=["message-batches-2024-09-24"],
493 )
494 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
495
496 @parametrize
497 async def test_raw_response_add(self, async_client: AsyncAnthropic) -> None:
498 response = await async_client.beta.organization.workspaces.service_accounts.with_raw_response.add(
499 workspace_id="workspace_id",
500 service_account_id="service_account_id",
501 workspace_role="workspace_admin",
502 )
503
504 assert response.is_closed is True
505 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
506 service_account = await response.parse()
507 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
508
509 @parametrize
510 async def test_streaming_response_add(self, async_client: AsyncAnthropic) -> None:
511 async with async_client.beta.organization.workspaces.service_accounts.with_streaming_response.add(
512 workspace_id="workspace_id",
513 service_account_id="service_account_id",
514 workspace_role="workspace_admin",
515 ) as response:
516 assert not response.is_closed
517 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
518
519 service_account = await response.parse()
520 assert_matches_type(BetaServiceAccountWorkspaceMember, service_account, path=["response"])
521
522 assert cast(Any, response.is_closed) is True
523
524 @parametrize
525 async def test_path_params_add(self, async_client: AsyncAnthropic) -> None:
526 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
527 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.add(
528 workspace_id="",
529 service_account_id="service_account_id",
530 workspace_role="workspace_admin",
531 )
532
533 @parametrize
534 async def test_method_remove(self, async_client: AsyncAnthropic) -> None:
535 service_account = await async_client.beta.organization.workspaces.service_accounts.remove(
536 service_account_id="service_account_id",
537 workspace_id="workspace_id",
538 )
539 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
540
541 @parametrize
542 async def test_method_remove_with_all_params(self, async_client: AsyncAnthropic) -> None:
543 service_account = await async_client.beta.organization.workspaces.service_accounts.remove(
544 service_account_id="service_account_id",
545 workspace_id="workspace_id",
546 betas=["message-batches-2024-09-24"],
547 )
548 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
549
550 @parametrize
551 async def test_raw_response_remove(self, async_client: AsyncAnthropic) -> None:
552 response = await async_client.beta.organization.workspaces.service_accounts.with_raw_response.remove(
553 service_account_id="service_account_id",
554 workspace_id="workspace_id",
555 )
556
557 assert response.is_closed is True
558 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
559 service_account = await response.parse()
560 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
561
562 @parametrize
563 async def test_streaming_response_remove(self, async_client: AsyncAnthropic) -> None:
564 async with async_client.beta.organization.workspaces.service_accounts.with_streaming_response.remove(
565 service_account_id="service_account_id",
566 workspace_id="workspace_id",
567 ) as response:
568 assert not response.is_closed
569 assert response.http_request.headers.get("X-Stainless-Lang") == "python"
570
571 service_account = await response.parse()
572 assert_matches_type(ServiceAccountRemoveResponse, service_account, path=["response"])
573
574 assert cast(Any, response.is_closed) is True
575
576 @parametrize
577 async def test_path_params_remove(self, async_client: AsyncAnthropic) -> None:
578 with pytest.raises(ValueError, match=r"Expected a non-empty value for `workspace_id` but received ''"):
579 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.remove(
580 service_account_id="service_account_id",
581 workspace_id="",
582 )
583
584 with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_account_id` but received ''"):
585 await async_client.beta.organization.workspaces.service_accounts.with_raw_response.remove(
586 service_account_id="",
587 workspace_id="workspace_id",
588 )