Test document CRUD operations
()
| 12 | |
| 13 | |
| 14 | def test_documents_crud(): |
| 15 | """Test document CRUD operations""" |
| 16 | print("\n=== Document CRUD Operations ===") |
| 17 | |
| 18 | # Create |
| 19 | doc = client.documents.add(content=f"Test content - {time.time()}") |
| 20 | print(f"✓ documents.add: {doc.id}") |
| 21 | |
| 22 | # Read |
| 23 | fetched = client.documents.get(doc.id) |
| 24 | print(f"✓ documents.get: {fetched.id}") |
| 25 | |
| 26 | # Update |
| 27 | updated = client.documents.update(doc.id, content=f"Updated - {time.time()}") |
| 28 | print(f"✓ documents.update: {updated.id}") |
| 29 | |
| 30 | # Wait for processing |
| 31 | time.sleep(10) |
| 32 | |
| 33 | # Delete |
| 34 | client.documents.delete(doc.id) |
| 35 | print("✓ documents.delete") |
| 36 | |
| 37 | |
| 38 | def test_batch_operations(): |