File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -185,13 +185,14 @@ def test_insert_multiple_with_duplicate(self):
185
185
db = self .db
186
186
db .drop_collection ("test_insert_multiple_with_duplicate" )
187
187
collection = db .test_insert_multiple_with_duplicate
188
- collection .ensure_index ([('i' , ASCENDING )], unique = True )
188
+ collection .create_index ([('i' , ASCENDING )], unique = True )
189
189
190
190
# No error
191
191
collection .insert ([{'i' : i } for i in range (5 , 10 )], w = 0 )
192
192
wait_until (lambda : 5 == collection .count (), 'insert 5 documents' )
193
193
194
- collection .remove ()
194
+ db .drop_collection ("test_insert_multiple_with_duplicate" )
195
+ collection .create_index ([('i' , ASCENDING )], unique = True )
195
196
196
197
# No error
197
198
collection .insert ([{'i' : 1 }] * 2 , w = 0 )
@@ -207,7 +208,7 @@ def test_insert_multiple_with_duplicate(self):
207
208
db .name , write_concern = WriteConcern (w = 0 ))
208
209
209
210
collection = db .test_insert_multiple_with_duplicate
210
- collection .ensure_index ([('i' , ASCENDING )], unique = True )
211
+ collection .create_index ([('i' , ASCENDING )], unique = True )
211
212
212
213
# No error.
213
214
collection .insert ([{'i' : 1 }] * 2 )
You can’t perform that action at this time.
0 commit comments