Debian Codegraph @

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