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

Method require_secondary_read_pref

test/__init__.py:582–589  ·  view source on GitHub ↗

Run a test only if the client is connected to a cluster that supports secondary read preference

(self)

Source from the content-addressed store, hash-verified

580 return False
581
582 def require_secondary_read_pref(self):
583 """Run a test only if the client is connected to a cluster that
584 supports secondary read preference
585 """
586 return self._require(
587 lambda: self.supports_secondary_read_pref,
588 "This cluster does not support secondary read preference",
589 )
590
591 def require_no_replica_set(self, func):
592 """Run a test if the client is *not* connected to a replica set."""

Callers

nothing calls this directly

Calls 1

_requireMethod · 0.95

Tested by

no test coverage detected