Skip to content

Commit 4cc5dbd

Browse files
committed
extending tests to consider Mixin filter tests
1 parent 0515600 commit 4cc5dbd

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

integrations/oracle/src/haystack_integrations/document_stores/oracle/document_store.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ def write_documents(
230230
and the policy is set to `DuplicatePolicy.FAIL` or `DuplicatePolicy.NONE`.
231231
:returns: The number of documents written to the document store.
232232
"""
233+
if not isinstance(documents, list):
234+
msg = "write_documents expects a list of Document objects."
235+
raise ValueError(msg)
236+
if documents and not isinstance(documents[0], Document):
237+
msg = "write_documents expects a list of Document objects."
238+
raise ValueError(msg)
233239
if not documents:
234240
return 0
235241
if policy in (DuplicatePolicy.NONE, DuplicatePolicy.FAIL):

integrations/oracle/tests/test_document_store.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,11 @@ def test_write_documents(self, document_store: OracleDocumentStore) -> None:
8181
# test_comparison_not_equal_with_none → IS NOT NULL
8282
# test_comparison_not_equal → col != x OR IS NULL
8383
# test_comparison_not_in → IS NULL OR NOT IN
84-
8584
@pytest.mark.skip(
8685
reason="Oracle NULL propagation in NOT(...) cannot match Python 'not (None == x) is True' semantics"
8786
)
8887
def test_not_operator(self, document_store, filterable_docs): ...
8988

90-
# Skipped: input validation not implemented
91-
92-
@pytest.mark.skip(reason="OracleDocumentStore does not validate input types in write_documents")
93-
def test_write_documents_invalid_input(self, document_store): ...
94-
9589
def test_write_documents_none_policy_calls_insert(self, patched_store, mock_pool):
9690
_, _, cursor = mock_pool
9791
patched_store.write_documents([self._mock_doc()], policy=DuplicatePolicy.NONE)

0 commit comments

Comments
 (0)