Skip to content

Commit 3709743

Browse files
committed
ADD test for update_documents_ndjson
1 parent ef8c216 commit 3709743

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/index/test_index_document_meilisearch.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,13 @@ def test_add_documents_ndjson(empty_index, songs_ndjson):
193193
task = index.wait_for_task(response.task_uid)
194194
assert task.status == 'succeeded'
195195
assert index.get_primary_key() == 'id'
196+
197+
def test_update_documents_ndjson(index_with_documents, songs_ndjson):
198+
"""Tests updating a single document with ndjson string."""
199+
index = index_with_documents()
200+
response = index.update_documents_ndjson(songs_ndjson)
201+
assert isinstance(response, TaskInfo)
202+
assert response.task_uid != None
203+
task = index.wait_for_task(response.task_uid)
204+
assert task.status == 'succeeded'
205+
assert index.get_primary_key() == 'id'

0 commit comments

Comments
 (0)