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

Method require_auth

test/__init__.py:535–539  ·  view source on GitHub ↗

Run a test only if the server is running with auth enabled.

(self, func)

Source from the content-addressed store, hash-verified

533 )
534
535 def require_auth(self, func):
536 """Run a test only if the server is running with auth enabled."""
537 return self._require(
538 lambda: self.auth_enabled, "Authentication is not enabled on the server", func=func
539 )
540
541 def require_no_auth(self, func):
542 """Run a test only if the server is running without auth enabled."""

Callers

nothing calls this directly

Calls 1

_requireMethod · 0.95

Tested by

no test coverage detected