|
37 | 37 | from pymongo.client_session import ClientSession, TransactionOptions, _TxnState
|
38 | 38 | from pymongo.change_stream import ChangeStream
|
39 | 39 | from pymongo.collection import Collection
|
40 |
| -from pymongo.cursor import Cursor |
41 | 40 | from pymongo.database import Database
|
42 | 41 | from pymongo.errors import BulkWriteError, InvalidOperation, PyMongoError
|
43 | 42 | from pymongo.monitoring import (
|
44 | 43 | CommandFailedEvent, CommandListener, CommandStartedEvent,
|
45 |
| - CommandSucceededEvent) |
| 44 | + CommandSucceededEvent, _SENSITIVE_COMMANDS) |
46 | 45 | from pymongo.read_concern import ReadConcern
|
47 | 46 | from pymongo.read_preferences import ReadPreference
|
48 |
| -from pymongo.results import BulkWriteResult, InsertManyResult, InsertOneResult |
| 47 | +from pymongo.results import BulkWriteResult |
49 | 48 | from pymongo.write_concern import WriteConcern
|
50 | 49 |
|
51 | 50 | from test import client_context, unittest, IntegrationTest
|
52 | 51 | from test.utils import (
|
53 |
| - camel_to_snake, rs_or_single_client, single_client, |
54 |
| - snake_to_camel, ScenarioDict) |
| 52 | + camel_to_snake, rs_or_single_client, single_client, snake_to_camel) |
55 | 53 |
|
56 | 54 | from test.version import Version
|
57 | 55 | from test.utils import (
|
@@ -136,7 +134,7 @@ def parse_bulk_write_error_result(error):
|
136 | 134 | class EventListenerUtil(CommandListener):
|
137 | 135 | def __init__(self, observe_events, ignore_commands):
|
138 | 136 | self._event_types = set(observe_events)
|
139 |
| - self._ignore_commands = set(ignore_commands) |
| 137 | + self._ignore_commands = _SENSITIVE_COMMANDS | set(ignore_commands) |
140 | 138 | self._ignore_commands.add('configureFailPoint')
|
141 | 139 | self.results = []
|
142 | 140 |
|
|
0 commit comments