Skip to content

Commit a3bf624

Browse files
committed
Test dropping an index twice.
1 parent 7b93414 commit a3bf624

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/test_collection.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ def test_drop_index(self):
283283
.count(), 3)
284284
self.assertEqual(name, "goodbye_1")
285285
db.test.drop_index(name)
286+
287+
# Drop it again.
288+
with self.assertRaises(OperationFailure):
289+
db.test.drop_index(name)
290+
286291
self.assertEqual(db.system.indexes.find({"ns": u("pymongo_test.test")})
287292
.count(), 2)
288293
self.assertTrue(u("hello_1") in

0 commit comments

Comments
 (0)