88
99import pytest
1010from haystack .dataclasses import Document
11- from haystack .document_stores .types import DuplicatePolicy
1211from haystack .testing .document_store import TEST_EMBEDDING_1
1312from haystack .testing .document_store_async import (
1413 CountDocumentsAsyncTest ,
2221 GetMetadataFieldsInfoAsyncTest ,
2322 GetMetadataFieldUniqueValuesAsyncTest ,
2423 UpdateByFilterAsyncTest ,
25- WriteDocumentsAsyncTest ,
2624)
2725
2826from haystack_integrations .document_stores .chroma import ChromaDocumentStore
@@ -63,7 +61,6 @@ class TestDocumentStoreAsync(
6361 GetMetadataFieldsInfoAsyncTest ,
6462 GetMetadataFieldUniqueValuesAsyncTest ,
6563 UpdateByFilterAsyncTest ,
66- WriteDocumentsAsyncTest ,
6764):
6865 @pytest .fixture
6966 def document_store (self , embedding_function ) -> ChromaDocumentStore :
@@ -78,23 +75,14 @@ def document_store(self, embedding_function) -> ChromaDocumentStore:
7875 port = 8000 ,
7976 )
8077
78+ # ── Chroma-specific write test ──────────────────────────────────────────
79+
8180 async def test_write_documents_async (self , document_store : ChromaDocumentStore ):
82- """Override: Chroma uses DuplicatesPolicy.OVERWRITE by default ."""
81+ """Chroma-specific: basic write test ."""
8382 doc = Document (content = "test doc" )
8483 await document_store .write_documents_async ([doc ])
8584 assert await document_store .count_documents_async () == 1
8685
87- async def test_write_documents_duplicate_fail_async (self , document_store : ChromaDocumentStore ):
88- """Override: Chroma does not raise DuplicateDocumentError.
89-
90- Chroma silently overwrites duplicate documents regardless of policy.
91- """
92-
93- doc = Document (content = "test doc" )
94- await document_store .write_documents_async ([doc ], policy = DuplicatePolicy .FAIL )
95- # Chroma silently overwrites — verify doc still exists
96- assert await document_store .count_documents_async () == 1
97-
9886 # ── Chroma-specific tests (not covered by mixins) ──────────────────────
9987
10088 async def test_client_settings_applied_async (self ):
0 commit comments