MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / create_test

Function create_test

test/test_discovery_and_monitoring.py:233–249  ·  view source on GitHub ↗
(scenario_def)

Source from the content-addressed store, hash-verified

231
232
233def create_test(scenario_def):
234 def run_scenario(self):
235 c = create_mock_topology(scenario_def["uri"])
236
237 for i, phase in enumerate(scenario_def["phases"]):
238 # Including the phase description makes failures easier to debug.
239 description = phase.get("description", str(i))
240 with assertion_context(f"phase: {description}"):
241 for response in phase.get("responses", []):
242 got_hello(c, common.partition_node(response[0]), response[1])
243
244 for app_error in phase.get("applicationErrors", []):
245 got_app_error(c, app_error)
246
247 check_outcome(self, c, phase["outcome"])
248
249 return run_scenario
250
251
252def create_tests():

Callers 1

create_testsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected