Skip to content

Commit 54565c0

Browse files
committed
added test for update_documents_csv
1 parent debf994 commit 54565c0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/index/test_index_document_meilisearch.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,17 @@ def test_add_documents_csv(empty_index, songs_csv):
197197
assert index.get_primary_key() == "id"
198198

199199

200+
def test_update_documents_csv(index_with_documents, small_movies_json_file):
201+
"""Tests updating a single document with csv string."""
202+
index = index_with_documents()
203+
response = index.update_documents_csv(small_movies_json_file)
204+
assert isinstance(response, TaskInfo)
205+
assert response.task_uid is not None
206+
task = index.wait_for_task(response.task_uid)
207+
assert task.status == "succeeded"
208+
assert index.get_primary_key() == "id"
209+
210+
200211
def test_add_documents_json(empty_index, small_movies_json_file):
201212
"""Tests adding new documents to a clean index."""
202213
index = empty_index()

0 commit comments

Comments
 (0)