MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_collection

Method test_collection

test/test_session.py:399–417  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

397 ]
398
399 def test_collection(self):
400 client = self.client
401 coll = client.pymongo_test.collection
402
403 # Test some collection methods - the rest are in test_cursor.
404 ops = self.collection_write_ops(coll)
405 ops.extend(
406 [
407 (coll.distinct, ["a"], {}),
408 (coll.find_one, [], {}),
409 (coll.count_documents, [{}], {}),
410 (coll.list_indexes, [], {}),
411 (coll.index_information, [], {}),
412 (coll.options, [], {}),
413 (coll.aggregate, [[]], {}),
414 ]
415 )
416
417 self._test_ops(client, *ops)
418
419 def test_cursor_clone(self):
420 coll = self.client.pymongo_test.collection

Callers

nothing calls this directly

Calls 2

collection_write_opsMethod · 0.95
_test_opsMethod · 0.95

Tested by

no test coverage detected