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

Method require_no_replica_set

test/__init__.py:591–595  ·  view source on GitHub ↗

Run a test if the client is *not* connected to a replica set.

(self, func)

Source from the content-addressed store, hash-verified

589 )
590
591 def require_no_replica_set(self, func):
592 """Run a test if the client is *not* connected to a replica set."""
593 return self._require(
594 lambda: not self.is_rs, "Connected to a replica set, not a standalone mongod", func=func
595 )
596
597 def require_ipv6(self, func):
598 """Run a test only if the client can connect to a server via IPv6."""

Callers

nothing calls this directly

Calls 1

_requireMethod · 0.95

Tested by

no test coverage detected