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

Method setUp

test/test_bulk.py:930–938  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

928 secondary: MongoClient
929
930 def setUp(self):
931 super().setUp()
932 self.w = client_context.w
933 self.secondary = None
934 if self.w is not None and self.w > 1:
935 for member in (client_context.hello)["hosts"]:
936 if member != (client_context.hello)["primary"]:
937 self.secondary = self.single_client(*partition_node(member))
938 break
939
940 def tearDown(self):
941 if self.secondary:

Callers

nothing calls this directly

Calls 3

partition_nodeFunction · 0.90
single_clientMethod · 0.80
setUpMethod · 0.45

Tested by

no test coverage detected