(self)
| 229 | self.assertTrue(command["nameOnly"]) |
| 230 | |
| 231 | def test_check_exists(self): |
| 232 | listener = OvertCommandListener() |
| 233 | client = self.rs_or_single_client(event_listeners=[listener]) |
| 234 | db = client[self.db.name] |
| 235 | db.drop_collection("unique") |
| 236 | db.create_collection("unique", check_exists=True) |
| 237 | self.assertIn("listCollections", listener.started_command_names()) |
| 238 | listener.reset() |
| 239 | db.drop_collection("unique") |
| 240 | db.create_collection("unique", check_exists=False) |
| 241 | self.assertGreater(len(listener.started_events), 0) |
| 242 | self.assertNotIn("listCollections", listener.started_command_names()) |
| 243 | |
| 244 | def test_list_collections(self): |
| 245 | self.client.drop_database("pymongo_test") |
nothing calls this directly
no test coverage detected