MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / test_index_sparse

Method test_index_sparse

test/test_collection.py:534–538  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

532 db.test.drop_indexes()
533
534 def test_index_sparse(self):
535 db = self.db
536 db.test.drop_indexes()
537 db.test.create_index([("key", ASCENDING)], sparse=True)
538 self.assertTrue((db.test.index_information())["key_1"]["sparse"])
539
540 def test_index_background(self):
541 db = self.db

Callers

nothing calls this directly

Calls 3

drop_indexesMethod · 0.45
create_indexMethod · 0.45
index_informationMethod · 0.45

Tested by

no test coverage detected