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

Method create_client

test/test_auth_oidc.py:775–783  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

773 return Inner()
774
775 def create_client(self, *args, **kwargs):
776 request_cb = kwargs.pop("request_cb", self.create_request_cb())
777 props = kwargs.pop("authmechanismproperties", {"OIDC_CALLBACK": request_cb})
778 kwargs["retryReads"] = False
779 if not len(args):
780 args = [self.uri_single]
781 client = MongoClient(*args, authmechanismproperties=props, **kwargs)
782 self.addCleanup(client.close)
783 return client
784
785 def test_1_1_callback_is_called_during_reauthentication(self):
786 # Create a ``MongoClient`` configured with a custom OIDC callback that

Calls 4

create_request_cbMethod · 0.95
MongoClientClass · 0.90
addCleanupMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected