(self)
| 104 | self.assertIsInstance(failed.duration_micros, int) |
| 105 | |
| 106 | def test_find_one(self): |
| 107 | self.client.pymongo_test.test.find_one() |
| 108 | started = self.listener.started_events[0] |
| 109 | succeeded = self.listener.succeeded_events[0] |
| 110 | self.assertEqual(0, len(self.listener.failed_events)) |
| 111 | self.assertIsInstance(succeeded, monitoring.CommandSucceededEvent) |
| 112 | self.assertIsInstance(started, monitoring.CommandStartedEvent) |
| 113 | self.assertEqualCommand( |
| 114 | SON([("find", "test"), ("filter", {}), ("limit", 1), ("singleBatch", True)]), |
| 115 | started.command, |
| 116 | ) |
| 117 | self.assertEqual("find", started.command_name) |
| 118 | self.assertEqual(self.client.address, started.connection_id) |
| 119 | self.assertEqual("pymongo_test", started.database_name) |
| 120 | self.assertIsInstance(started.request_id, int) |
| 121 | |
| 122 | def test_find_and_get_more(self): |
| 123 | self.client.pymongo_test.test.drop() |
nothing calls this directly
no test coverage detected