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

Method _event_count

test/unified_format.py:1183–1194  ·  view source on GitHub ↗
(self, client_name, event)

Source from the content-addressed store, hash-verified

1181 self.assertEqual(spec["connections"], pool.active_sockets)
1182
1183 def _event_count(self, client_name, event):
1184 listener = self.entity_map.get_listener_for_client(client_name)
1185 actual_events = listener.get_events("all")
1186 count = 0
1187 for actual in actual_events:
1188 try:
1189 self.match_evaluator.match_event(event, actual)
1190 except AssertionError:
1191 continue
1192 else:
1193 count += 1
1194 return count
1195
1196 def _testOperation_assertEventCount(self, spec):
1197 """Run the assertEventCount test operation.

Calls 3

get_eventsMethod · 0.80
match_eventMethod · 0.80

Tested by

no test coverage detected