async def test_list_chunks_with_multiple_documents(
            self, test_client: AsyncR2RTestClient):
        """Test listing chunks across multiple documents."""
        # Create and login as temporary user
        temp_email = f"{uuid.uuid4()}@example.com"
        await test_client.register_user(temp_email, "password123")
        await test_client.login_user(temp_email, "password123")

        doc_ids = []
        try:
            # Create multiple documents
            for i in range(2):
                doc_id, _ = await test_client.create_document(
                    [f"Doc {i} chunk 1", f"Doc {i} chunk 2"])
                doc_ids.append(doc_id)

            await asyncio.sleep(5)  # Wait for ingestion

            # List all chunks
            response = await test_client.client.chunks.list(offset=0, limit=10)

            assert len(response.results) == 4, "Expected 4 total chunks"

            chunk_doc_ids = {
                str(chunk.document_id)
                for chunk in response.results
            }
            assert all(
                str(doc_id) in chunk_doc_ids
                for doc_id in doc_ids), ("Got chunks from wrong documents")

        finally:
            # Cleanup
            for doc_id in doc_ids:
                try:
                    await test_client.delete_document(doc_id)
                except:
                    pass
            await test_client.logout_user()
Test listing chunks across multiple documents.
py/tests/unit/document/test_chunks.py