@@ -91,17 +91,23 @@ def test_update_documents(index_with_documents, small_movies):
91
91
"""Tests updating a single document and a set of documents."""
92
92
index = index_with_documents ()
93
93
response = index .get_documents ()
94
- response .results [0 ].title = 'Some title'
95
- update = index .update_documents ([dict (response .results [0 ])])
94
+ doc = response .results [0 ]
95
+ doc .title = 'Some title'
96
+
97
+ update = index .update_documents ([dict (doc )])
98
+
96
99
assert isinstance (update , TaskInfo )
97
100
assert update .task_uid != None
98
101
index .wait_for_task (update .task_uid )
99
- response = index .get_documents ()
100
- assert response .results [0 ].title == 'Some title'
102
+
103
+ response = index .get_document (doc .id )
104
+ assert response .title == 'Some title'
105
+
101
106
update = index .update_documents (small_movies )
102
107
index .wait_for_task (update .task_uid )
103
- response = index .get_documents ()
104
- assert response .results [0 ].title != 'Some title'
108
+
109
+ response = index .get_document (doc .id )
110
+ assert response .title != 'Some title'
105
111
106
112
@pytest .mark .parametrize ('batch_size' , [2 , 3 , 1000 ])
107
113
@pytest .mark .parametrize (
0 commit comments