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

Method test_create_collection

test/test_collation.py:122–131  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

120 self.assertEqual(self.collation.document, self.last_command_started()["collation"])
121
122 def test_create_collection(self):
123 self.db.test.drop()
124 self.db.create_collection("test", collation=self.collation)
125 self.assertCollationInLastCommand()
126
127 # Test passing collation as a dict as well.
128 self.db.test.drop()
129 self.listener.reset()
130 self.db.create_collection("test", collation=self.collation.document)
131 self.assertCollationInLastCommand()
132
133 def test_index_model(self):
134 model = IndexModel([("a", 1), ("b", -1)], collation=self.collation)

Callers

nothing calls this directly

Calls 4

dropMethod · 0.45
create_collectionMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected