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

Method tearDown

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

Source from the content-addressed store, hash-verified

105 self.initial_lsids = {s["id"] for s in session_ids(self.client)}
106
107 def tearDown(self):
108 monitoring._SENSITIVE_COMMANDS.update(self.sensitive_commands)
109 self.client.drop_database("pymongo_test")
110 used_lsids = self.initial_lsids.copy()
111 for event in self.session_checker_listener.started_events:
112 if "lsid" in event.command:
113 used_lsids.add(event.command["lsid"]["id"])
114
115 current_lsids = {s["id"] for s in session_ids(self.client)}
116 self.assertLessEqual(used_lsids, current_lsids)
117
118 super().tearDown()
119
120 def _test_ops(self, client, *ops):
121 listener = client.options.event_listeners[0]

Callers

nothing calls this directly

Calls 5

copyMethod · 0.80
addMethod · 0.80
session_idsFunction · 0.70
updateMethod · 0.45
drop_databaseMethod · 0.45

Tested by

no test coverage detected