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

Method mock_connect

test/test_connection_monitoring.py:368–369  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

366 pool = get_pool(client)
367
368 def mock_connect(*args, **kwargs):
369 raise ConnectionFailure("connect failed")
370
371 pool.connect = mock_connect
372 # Un-patch Pool.connect to break the cyclic reference.

Callers

nothing calls this directly

Calls 1

ConnectionFailureClass · 0.90

Tested by

no test coverage detected