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

Method cleanup_colls

test/__init__.py:1172–1177  ·  view source on GitHub ↗

Cleanup collections faster than drop_collection.

(self, *collections)

Source from the content-addressed store, hash-verified

1170 self.credentials = {}
1171
1172 def cleanup_colls(self, *collections):
1173 """Cleanup collections faster than drop_collection."""
1174 for c in collections:
1175 c = self.client[c.database.name][c.name]
1176 c.delete_many({})
1177 c.drop_indexes()
1178
1179 def patch_system_certs(self, ca_certs):
1180 patcher = SystemCertsPatcher(ca_certs)

Callers 3

setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45

Calls 2

delete_manyMethod · 0.45
drop_indexesMethod · 0.45

Tested by 3

setUpMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36